<html lang="zh"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script data-ezscrex='false' data-cfasync='false' data-pagespeed-no-defer>var __ez=__ez||{};__ez.stms=Date.now();__ez.evt={};__ez.script={};__ez.ck=__ez.ck||{};__ez.template={};__ez.template.isOrig=false;__ez.queue=function(){var e=0,i=0,t=[],n=!1,o=[],r=[],s=!0,a=function(e,i,n,o,r,s,a){var l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:window,d=this;this.name=e,this.funcName=i,this.parameters=null===n?null:p(n)?n:[n],this.isBlock=o,this.blockedBy=r,this.deleteWhenComplete=s,this.isError=!1,this.isComplete=!1,this.isInitialized=!1,this.proceedIfError=a,this.fWindow=l,this.isTimeDelay=!1,this.process=function(){f("... func = "+e),d.isInitialized=!0,d.isComplete=!0,f("... func.apply: "+e);var i=d.funcName.split("."),n=null,o=this.fWindow||window;i.length>3||(n=3===i.length?o[i[0]][i[1]][i[2]]:2===i.length?o[i[0]][i[1]]:o[d.funcName]),null!=n&&n.apply(null,this.parameters),!0===d.deleteWhenComplete&&delete t[e],!0===d.isBlock&&(f("----- F'D: "+d.name),u())}},l=function(e,i,t,n,o,r,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:window,l=this;this.name=e,this.path=i,this.async=o,this.defer=r,this.isBlock=t,this.blockedBy=n,this.isInitialized=!1,this.isError=!1,this.isComplete=!1,this.proceedIfError=s,this.fWindow=a,this.isTimeDelay=!1,this.isPath=function(e){return"/"===e[0]&&"/"!==e[1]},this.getSrc=function(e){return void 0!==window.__ezScriptHost&&this.isPath(e)&&"banger.js"!==this.name?window.__ezScriptHost+e:e},this.process=function(){l.isInitialized=!0,f("... file = "+e);var i=this.fWindow?this.fWindow.document:document,t=i.createElement("script");t.src=this.getSrc(this.path),!0===o?t.async=!0:!0===r&&(t.defer=!0),t.onerror=function(){var e={url:window.location.href,name:l.name,path:l.path,user_agent:window.navigator.userAgent};"undefined"!=typeof _ezaq&&(e.pageview_id=_ezaq.page_view_id);var i=encodeURIComponent(JSON.stringify(e)),t=new XMLHttpRequest;t.open("GET","//g.ezoic.net/ezqlog?d="+i,!0),t.send(),f("----- ERR'D: "+l.name),l.isError=!0,!0===l.isBlock&&u()},t.onreadystatechange=t.onload=function(){var e=t.readyState;f("----- F'D: "+l.name),e&&!/loaded|complete/.test(e)||(l.isComplete=!0,!0===l.isBlock&&u())},i.getElementsByTagName("head")[0].appendChild(t)}},d=function(e,i){this.name=e,this.path="",this.async=!1,this.defer=!1,this.isBlock=!1,this.blockedBy=[],this.isInitialized=!0,this.isError=!1,this.isComplete=i,this.proceedIfError=!1,this.isTimeDelay=!1,this.process=function(){}};function c(e){!0!==h(e)&&0!=s&&e.process()}function h(e){if(!0===e.isTimeDelay&&!1===n)return f(e.name+" blocked = TIME DELAY!"),!0;if(p(e.blockedBy))for(var i=0;i<e.blockedBy.length;i++){var o=e.blockedBy[i];if(!1===t.hasOwnProperty(o))return f(e.name+" blocked = "+o),!0;if(!0===e.proceedIfError&&!0===t[o].isError)return!1;if(!1===t[o].isComplete)return f(e.name+" blocked = "+o),!0}return!1}function f(e){var i=window.location.href,t=new RegExp("[?&]ezq=([^&#]*)","i").exec(i);"1"===(t?t[1]:null)&&console.debug(e)}function u(){++e>200||(f("let's go"),m(o),m(r))}function m(e){for(var i in e)if(!1!==e.hasOwnProperty(i)){var t=e[i];!0===t.isComplete||h(t)||!0===t.isInitialized||!0===t.isError?!0===t.isError?f(t.name+": error"):!0===t.isComplete?f(t.name+": complete already"):!0===t.isInitialized&&f(t.name+": initialized already"):t.process()}}function p(e){return"[object Array]"==Object.prototype.toString.call(e)}return window.addEventListener("load",(function(){setTimeout((function(){n=!0,f("TDELAY -----"),u()}),5e3)}),!1),{addFile:function(e,i,n,s,a,d,h,f,u){var m=new l(e,i,n,s,a,d,h,u);!0===f?o[e]=m:r[e]=m,t[e]=m,c(m)},addDelayFile:function(e,i){var n=new l(e,i,!1,[],!1,!1,!0);n.isTimeDelay=!0,f(e+" ...  FILE! TDELAY"),r[e]=n,t[e]=n,c(n)},addFunc:function(e,n,s,l,d,h,f,u,m,p){!0===h&&(e=e+"_"+i++);var w=new a(e,n,s,l,d,f,u,p);!0===m?o[e]=w:r[e]=w,t[e]=w,c(w)},addDelayFunc:function(e,i,n){var o=new a(e,i,n,!1,[],!0,!0);o.isTimeDelay=!0,f(e+" ...  FUNCTION! TDELAY"),r[e]=o,t[e]=o,c(o)},items:t,processAll:u,setallowLoad:function(e){s=e},markLoaded:function(e){if(e&&0!==e.length){if(e in t){var i=t[e];!0===i.isComplete?f(i.name+" "+e+": error loaded duplicate"):(i.isComplete=!0,i.isInitialized=!0)}else t[e]=new d(e,!0);f("markLoaded dummyfile: "+t[e].name)}},logWhatsBlocked:function(){for(var e in t)!1!==t.hasOwnProperty(e)&&h(t[e])}}}();__ez.evt.add=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n()},__ez.evt.remove=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t]};__ez.script.add=function(e){var t=document.createElement("script");t.src=e,t.async=!0,t.type="text/javascript",document.getElementsByTagName("head")[0].appendChild(t)};__ez.dot={};__ez.queue.addFile('/detroitchicago/boise.js', '/detroitchicago/boise.js?gcb=195-2&cb=2', true, [], true, false, true, false);__ez.queue.addFile('/parsonsmaize/abilene.js', '/parsonsmaize/abilene.js?gcb=195-2&cb=28', true, [], true, false, true, false);</script>
<script data-ezscrex="false" type="text/javascript" data-cfasync="false">window._ezaq = Object.assign({}, typeof window._ezaq !== "undefined" ? window._ezaq : {}, {"ad_cache_level":1,"domain_id":173770,"ezcache_level":2,"ezcache_skip_code":0,"has_bad_image":0,"has_bad_words":0,"is_sitespeed":0,"lt_cache_level":0,"page_view_id":"9437cdce-f71b-4fd8-4973-513e78744f2c","response_size_orig":161737,"response_time_orig":6,"template_id":134,"url":"https://plantuml.com/zh/sequence-diagram","word_count":4011,"worst_bad_word_level":0});__ez.queue.markLoaded('ezaqBaseReady');</script>
<script type="text/javascript">(function(){function storageAvailable(type){var storage;try{storage=window[type];var x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);return true;}
catch(e){return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==='QuotaExceededError'||e.name==='NS_ERROR_DOM_QUOTA_REACHED')&&(storage&&storage.length!==0);}}
function remove_ama_config(){if(storageAvailable('localStorage')){localStorage.removeItem("google_ama_config");}}
remove_ama_config()})()</script>
<script type="text/javascript">var ezoicTestActive = true</script>
<script data-ezscrex="false" type="text/javascript" data-cfasync="false">window._ezaq = Object.assign({}, typeof window._ezaq !== "undefined" ? window._ezaq : {}, {"ab_test_id":"mod174-c","ad_cache_level":1,"ad_count_adjustment":0,"ad_lazyload_version":0,"ad_load_version":1,"ad_location_ids":"","adx_ad_count":0,"ai_placeholder_cache_level":1,"ai_placeholder_placement_cnt":-1,"bidder_method":1,"bidder_version":3,"city":"Krasnoyarsk","country":"RU","days_since_last_visit":-1,"display_ad_count":0,"domain_id":173770,"domain_test_group":20230802,"ds_adsize_opt_id":-1,"engaged_time_visit":0,"ezcache_level":2,"ezcache_skip_code":0,"form_factor_id":1,"framework_id":1,"has_bad_image":0,"has_bad_words":0,"iab_category":"","iab_category_0":"596","is_embed":false,"is_from_recommended_pages":false,"is_return_visitor":false,"is_sitespeed":0,"last_page_load":"","last_pageview_id":"","lt_cache_level":0,"max_ads":0,"metro_code":0,"optimization_version":1,"page_ad_positions":"","page_view_count":319,"page_view_id":"9437cdce-f71b-4fd8-4973-513e78744f2c","position_selection_id":0,"postal_code":"660000","pv_event_count":0,"response_size_orig":161737,"response_time_orig":6,"serverid":"i-04b64232fb1ef8e5d","state":"KYA","sub_page_ad_positions":"","t_epoch":1697690916,"template_id":134,"time_on_site_visit":0,"url":"https://plantuml.com/zh/sequence-diagram","word_count":4011,"worst_bad_word_level":0});__ez.queue.markLoaded('ezaqReady');</script>
<script data-ezscrex='false' data-cfasync='false' data-pagespeed-no-defer>__ez.queue.addFile('/parsonsmaize/mulvane.js', '/parsonsmaize/mulvane.js?gcb=195-2&cb=5', true, ['/parsonsmaize/abilene.js'], true, false, true, false);__ez.queue.addFile('/parsonsmaize/olathe.js', '/parsonsmaize/olathe.js?gcb=195-2&cb=20', false, ['/parsonsmaize/abilene.js','/parsonsmaize/mulvane.js'], true, false, true, false);__ez.queue.addFile('/porpoiseant/et.js', '/porpoiseant/et.js?gcb=195-2&cb=2', false, [], true, false, true, false);!function(){var e;__ez.vep=(e=[],{Add:function(i,t){__ez.dot.isDefined(i)&&__ez.dot.isValid(t)&&e.push({type:"video",video_impression_id:i,domain_id:__ez.dot.getDID(),t_epoch:__ez.dot.getEpoch(0),data:__ez.dot.dataToStr(t)})},Fire:function(){if(void 0===document.visibilityState||"prerender"!==document.visibilityState){if(__ez.dot.isDefined(e)&&e.length>0)for(;e.length>0;){var i=5;i>e.length&&(i=e.length);var t=e.splice(0,i),o=__ez.dot.getURL("/detroitchicago/grapefruit.gif")+"?orig="+(!0===__ez.template.isOrig?1:0)+"&v="+btoa(JSON.stringify(t));__ez.dot.Fire(o)}e=[]}}})}();</script><script data-ezscrex='false' data-cfasync='false' data-pagespeed-no-defer>!function(){function e(i){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(i)}__ez.pel=function(){var i=[];function t(t,o,d,_,n,r,a,s){if(__ez.dot.isDefined(t)&&0!=__ez.dot.isAnyDefined(t.getSlotElementId,t.ElementId)){void 0===s&&(s=!1);var p=parseInt(__ez.dot.getTargeting(t,"ap")),f=__ez.dot.getSlotIID(t),u=__ez.dot.getAdUnit(t,s),z=parseInt(__ez.dot.getTargeting(t,"compid")),g=0,c=0,l=function(i){if("undefined"==typeof _ezim_d)return!1;var t=__ez.dot.getAdUnitPath(i).split("/").pop();if("object"===("undefined"==typeof _ezim_d?"undefined":e(_ezim_d))&&_ezim_d.hasOwnProperty(t))return _ezim_d[t];for(var o in _ezim_d)if(o.split("/").pop()===t)return _ezim_d[o];return!1}(t);"object"==e(l)&&(void 0!==l.creative_id&&(c=l.creative_id),void 0!==l.line_item_id&&(g=l.line_item_id)),__ez.dot.isDefined(f,u)&&__ez.dot.isValid(o)&&("0"===f&&!0!==s||""===u||i.push({type:"impression",impression_id:f,domain_id:__ez.dot.getDID(),unit:u,t_epoch:__ez.dot.getEpoch(0),revenue:d,est_revenue:_,ad_position:p,ad_size:"",bid_floor_filled:n,bid_floor_prev:r,stat_source_id:a,country_code:__ez.dot.getCC(),pageview_id:__ez.dot.getPageviewId(),comp_id:z,line_item_id:g,creative_id:c,data:__ez.dot.dataToStr(o),is_orig:s||__ez.template.isOrig}))}}function o(){void 0!==document.visibilityState&&"prerender"===document.visibilityState||(__ez.dot.isDefined(i)&&i.length>0&&[i.filter((function(e){return e.is_orig})),i.filter((function(e){return!e.is_orig}))].forEach((function(e){for(;e.length>0;){var i=e[0].is_orig||!1,t=5;t>e.length&&(t=e.length);var o=e.splice(0,t),d=__ez.dot.getURL("/porpoiseant/army.gif")+"?orig="+(!0===i?1:0)+"&sts="+btoa(JSON.stringify(o));(void 0!==window.isAmp&&isAmp||void 0!==window.ezWp&&ezWp)&&void 0!==window._ezaq&&_ezaq.hasOwnProperty("domain_id")&&(d+="&visit_uuid="+_ezaq.visit_uuid),__ez.dot.Fire(d)}})),i=[])}return{Add:t,AddAndFire:function(e,i){t(e,i,0,0,0,0,0),o()},AddAndFireOrig:function(e,i){t(e,i,0,0,0,0,0,!0),o()},AddById:function(e,t,o,d){var _=e.split("/");if(__ez.dot.isDefined(e)&&3===_.length&&__ez.dot.isValid(t)){var n=_[0],r={type:"impression",impression_id:_[2],domain_id:__ez.dot.getDID(),unit:n,t_epoch:__ez.dot.getEpoch(0),pageview_id:__ez.dot.getPageviewId(),data:__ez.dot.dataToStr(t),is_orig:o||__ez.template.isOrig};void 0!==d&&(r.revenue=d),i.push(r)}},Fire:o,GetPixels:function(){return i}}}()}();__ez.queue.addFile('/detroitchicago/raleigh.js', '/detroitchicago/raleigh.js?gcb=195-2&cb=6', false, ['/parsonsmaize/abilene.js'], true, false, true, false);__ez.queue.addFile('/detroitchicago/vista.js', '/detroitchicago/vista.js?gcb=195-2&cb=5', false, ['/parsonsmaize/abilene.js'], true, false, true, false);__ez.queue.addFile('/detroitchicago/tampa.js', '/detroitchicago/tampa.js?gcb=195-2&cb=5', false, ['/parsonsmaize/abilene.js'], true, false, true, false);</script><base href=""/><meta name="flattr:id" content="1ew3x0"/><script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "url": "https://plantuml.com",
  "name": "PlantUML",
  "sameAs" : ["https://twitter.com/plantuml","https://en.wikipedia.org/wiki/PlantUML","https://www.wikidata.org/wiki/Q18346546"],
  "logo": "https://cdn-0.plantuml.com/logo3.png",
  "contactPoint": [{
    "@type": "ContactPoint",
    "email": "plantuml@gmail.com",
    "url": "https://plantuml.com",
    "contactType": "customer service"
  }]
}
</script><script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [{
    "@type": "ListItem",
    "position": 1,
    "item": {
      "@id": "https://plantuml.com",
      "name": "Home"
    }
  },{
    "@type": "ListItem",
    "position": 2,
    "item": {
      "@id": "https://plantuml.com/sitemap-language-specification",
      "name": "Language specification"
    }
  },{
    "@type": "ListItem",
    "position": 3,
    "item": {
      "@id": "https://plantuml.com/sequence-diagram",
      "name": "Sequence Diagram"
  }
  }]
}
</script><link rel="canonical" href="sequence-diagram.html"/><link rel="alternate" hreflang="x-default" href="../sequence-diagram.html"/><link rel="alternate" hreflang="de" href="../de/sequence-diagram.html"/><link rel="alternate" hreflang="en" href="../sequence-diagram.html"/><link rel="alternate" hreflang="es" href="../es/sequence-diagram.html"/><link rel="alternate" hreflang="fr" href="../fr/sequence-diagram.html"/><link rel="alternate" hreflang="ja" href="../ja/sequence-diagram.html"/><link rel="alternate" hreflang="ru" href="../ru/sequence-diagram.html"/><link rel="alternate" hreflang="ko" href="../ko/sequence-diagram.html"/><link rel="alternate" hreflang="zh" href="sequence-diagram.html"/><link rel="shortcut icon" href="../favicon.ico"/><link rel="preload" as="image" href="../svgrepo-house.svg"/><link rel="preload" as="image" href="../svgrepo-text-news.svg"/><link rel="preload" as="image" href="../svgrepo-rocket-3-start.svg"/><link rel="preload" as="image" href="../svgrepo-server.svg"/><link rel="preload" as="image" href="../svgrepo-play.svg"/><link rel="preload" as="image" href="../svgrepo-forum.svg"/><link rel="preload" as="image" href="../svgrepo-add-to-online-cart.svg"/><link rel="preload" as="image" href="../svgrepo-forum-message.svg"/><link rel="preload" as="image" href="../svgrepo-palette-fill.svg"/><link rel="preload" as="image" href="../svgrepo-cpu.svg"/><link rel="preload" as="image" href="../svgrepo-books-library.svg"/><link rel="preload" as="image" href="../svgrepo-signpost-fill.svg"/><link rel="preload" as="image" href="../svgrepo-library.svg"/><link rel="preload" as="image" href="../flags21.png"/><link rel="preload" as="image" href="../svgrepo-uxwing-light-mode-toggle.svg"/><title>时序图的语法和功能</title><meta name="description" content="PlantUML时序图的语法：你可以有几种类型的参与者（演员等其他角色）、箭头、备注、分组...改变字体和颜色也是可行的。"/><meta property="og:type" content="article"/><meta property="og:title" content="顺序图的语法和功能"/><meta property="og:description" content="PlantUML序列图的语法：你可以有几种类型的参与者（演员和其他人），箭头，音符，组...改变字体和颜色也有可能。"/><meta property="og:url" content="https://plantuml.com/zh/sequence-diagram"/><meta property="og:site_name" content="PlantUML.com"/><meta name="twitter:image" content="https://plantuml.com/og-sequence-diagram"/><meta property="og:locale" content="zh"/><meta name="twitter:card" content="summary"/><meta name="twitter:title" content="顺序图的语法和功能"/><meta name="twitter:description" content="PlantUML序列图的语法：你可以有几种类型的参与者（演员和其他人），箭头，音符，组...改变字体和颜色也有可能。"/><meta name="twitter:site" content="@PlantUML"/><meta name="twitter:creator" content="@PlantUML"/><style>li{margin:2px}#external li{margin:13px}.pezoic{max-width:970px}@media screen and (max-width:1600px){.pezoic{max-width:768px}}.coptable{max-width:90%}.mytab{display:inline-block;border-radius:3px;border:1px solid #e1e4e8}.mytab:hover{border:1px dashed #0366d6;cursor:pointer;color:#0366d6;background:#f6f8fa}.cop{margin:25px 10px 0 10px}.cop:hover{cursor:pointer;filter:invert(30%) sepia(75%) saturate(4001%) hue-rotate(201deg) brightness(88%) contrast(98%)}.cop2{margin:25px 10px 0 10px}.cop2:hover{cursor:pointer}.msg{position:absolute;color:#396;background-color:#FFF;margin-top:55px;display:none;border-radius:3px;border:1px solid #4dff00}.mycell0{float:left;vertical-align:top;padding:10px}.mycell0 code:hover{cursor:default;color:#000}.mycell{float:right;vertical-align:top;padding:10px;max-width:55vw;overflow-x:auto}.mycell0 pre{max-width:55vw;overflow-x:auto}.cod{background:#edeff3;padding:2px 5px;border-radius:3px}.colo{display:inline-block;background:#edeff3;padding:7px 12px;border-radius:3px}.tag,.tagg,.tago,.tagr{text-rendering:optimizeLegibility;display:inline-block;padding:3px 5px 2px 4px;text-decoration:none;white-space:nowrap;border:1px solid #999;text-transform:uppercase;text-align:center;border-radius:3px;font-size:11px;font-weight:bold;line-height:90%}.tag{background-color:#eee}.tagg{background-color:#98fb98}.tago{background-color:#fafa00}.tagr{background-color:#ff4500}a{text-decoration:none;color:#0366d6}a:hover{text-decoration:underline}.menu1{border:0;font-family:Helvetica,sans-serif;font-size:14px;padding:0;margin:0;white-space:nowrap;overflow:hidden;vertical-align:middle;line-height:30px}.menu1 a{text-align:center;padding:10px 7px 10px 7px;text-decoration:none;color:#637282}.menu1 a:hover{color:#0366d6}#menu0{top:0;z-index:4;margin:0 0 0 10px;padding:0}@media screen and (max-width:1200px){#menu0{visibility:hidden}}.mhov img{margin:0 5px 0 0;padding:0}.mhov:hover{filter:invert(25%) sepia(97%) saturate(2026%) hue-rotate(201deg) brightness(91%) contrast(98%)}#menuside2{border:0;font-family:Helvetica,sans-serif;font-size:14px;padding:20px 0 4px 0;margin:0}#menuside2 span{vertical-align:top}#menuside2 li{list-style:none;position:relative;padding:0;margin:10px 20px 10px 10px;border:0}#menuside2 li a{display:inline-block;text-decoration:none;color:#637282;width:100%}#BC{z-index:0;padding-top:5px;top:35px}.breadcrumb{z-index:1;font-family:Helvetica,sans-serif;font-size:14px;text-align:center;display:inline-block;overflow:hidden;border-radius:5px}.breadcrumb a{text-decoration:none;outline:0;display:block;float:left;font-size:12px;line-height:24px;color:#373f49;padding:0 10px 0 35px;background:#f0f1f1;background:linear-gradient(#f0f1f1,#c6d2d2);position:relative}.breadcrumb a:first-child{padding-left:21px;border-radius:5px 0 0 5px}.breadcrumb a:first-child:before{left:14px}.breadcrumb a:last-child{visibility:hidden}.breadcrumb a.active,.breadcrumb a:hover{color:#0366d6;background:#c6d2d2;background:linear-gradient(#e3e4e4,#b8c7c7)}.breadcrumb a.active:after,.breadcrumb a:hover:after{background:#c6d2d2;background:linear-gradient(135deg,#e3e4e4,#b8c7c7)}.breadcrumb a:after{content:'';position:absolute;top:0;right:-12px;width:24px;height:24px;transform:scale(0.707) rotate(45deg);z-index:1;background:#f0f1f1;background:linear-gradient(135deg,#f0f1f1,#c6d2d2);box-shadow:2px -2px 0 2px rgba(0,0,0,0.1),3px -3px 0 2px rgba(255,255,255,0.1);border-radius:0 5px 0 50px}.breadcrumb a:last-child:after{content:none;visibility:hidden}.lga,.lga a,.lgi,.lgi a{font-family:Helvetica,sans-serif;font-size:13px;text-align:center;color:#fff;padding:0 5px;margin:0}.lga,.lga a{background-color:#008}.lgi,.lgi a{background-color:#888}.lga:hover,.lga:hover a{text-decoration:none;color:#BBB}.lgi:hover,.lgi:hover a{text-decoration:none;color:#CCC}</style><style>.backtop{margin:0 10px}.backtop:hover{cursor:pointer;filter:invert(30%) sepia(75%) saturate(4001%) hue-rotate(201deg) brightness(88%) contrast(98%)}</style><style>.dropbtn{padding:0;border:0;background:0}.dropdown{position:relative;display:inline-block;margin:0 10px}.dropdown-content{display:none;position:absolute;background-color:#f1f1f1;min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,0.2);z-index:1}.dropdown-content img{vertical-align:middle;margin:0 8px 0 1px}.dropdown-content a{font-size:small;font-weight:normal;color:black;padding:5px 10px;text-decoration:none;display:block}.dropdown-content a:hover{background-color:#ddd;color:#0366d6}.dropdown:hover .dropdown-content{display:block}.dropdown:hover .dropbtn{background-color:#3e8e41}</style><style>#flex1{margin:0;padding:0;display:flex;flex-direction:row;width:378px;height:100%}#lll{flex-grow:1;flex-shrink:1;max-width:162px;overflow:hidden}#mmm{flex-grow:0;flex-shrink:0;background:#edeff3;width:210px;min-width:210px;max-width:210px;flex-grow:0;flex-shrink:0;border-left:1px solid #d4d8de}#qqq{flex-grow:0;flex-shrink:0;width:4px;min-width:4px;max-width:4px;flex-grow:0;flex-shrink:0}#rrr{flex-grow:1;flex-shrink:1;max-width:162px;overflow:hidden}.cde{display:flex;flex-direction:column;justify-content:space-between;height:100%}.cd{display:flex;flex-direction:column;justify-content:space-start;height:100%}.aaa{height:30px;min-height:30px;max-height:30px;flex-grow:0;flex-shrink:0;background:#edeff3;border-bottom:1px solid #d4d8de}.bbb,.bbborder{flex-grow:1;flex-shrink:0}.bbborder{border-left:1px solid #d4d8de}#header{z-index:10;position:fixed;left:378px;right:0;height:30px;top:0;background:#edeff3;border-bottom:1px solid #d4d8de}#header2{z-index:7;position:fixed;left:378px;right:0;height:10px;top:30px;background:#fefefe}#left0{top:0;position:fixed;left:0;margin:0;bottom:0;width:378px;padding:0;z-index:2}#root{padding:0;margin:40px 0 0 388px;background:#fefefe}body{margin:auto;overflow-x:hidden;background:#fefefe}@media screen and (max-width:1190px){#flex1,#left0{width:215px}#root{margin:40px 0 0 224px}#header,#header2{left:215px}#left0{left:0}#lll,#rrr{width:0;visibility:hidden;flex-grow:0;flex-shrink:0}}@media screen and (max-width:1010px){#root{margin:0 0 0 216px}#header,#header2{display:none}#lll,#qqq{width:0;visibility:hidden;flex-grow:0;flex-shrink:0}#mmm{border-right:1px solid #d4d8de}}@media screen and (min-width:1700px){#header,#header2{left:518px}#left0,#flex1{width:518px}#root{margin-left:528px}#lll,#rrr{max-width:302px}}</style><script>window.pushMST_config={vapidPK:"BBodn2vLFoDO5AdCfmOOzNmcUsn52kTA6JNZNYVFymzEdWHonz_bkUcsaTkPXHvNGRkRUSAxMbup-H0l2sb1h_Q",enableOverlay:true,swPath:"/sw.js",i18n:{}};var pushmasterTag=document.createElement("script");pushmasterTag.src="https://cdn.pushmaster-cdn.xyz/scripts/publishers/629f5e297baecc00098a271b/SDK.js";pushmasterTag.setAttribute("defer","");var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(pushmasterTag,firstScriptTag);</script><script async="" src="https://www.googletagmanager.com/gtag/js?id=G-TKZNNQT9CZ"></script><script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date());gtag("config","G-TKZNNQT9CZ");</script><script>var llg="zh";var az=0;var amdark=0;function ljs(b){if(az){return false}var a=document.createElement("script");a.type="text/javascript";a.src="/btn-"+b+".js";document.body.innerHTML="<i style='position:absolute;top:30%;width:100%;'><center>Loading in progress...";document.body.appendChild(a)}function ctc(c){document.getElementById("img"+c).classList.remove("cop");document.getElementById("img"+c).classList.add("cop2");document.getElementById("pre"+c).style.backgroundColor="#4dff00";document.getElementById("msg"+c).style.display="inline";setTimeout(function(){document.getElementById("img"+c).classList.remove("cop2");document.getElementById("img"+c).classList.add("cop");document.getElementById("pre"+c).style.backgroundColor="";document.getElementById("msg"+c).style.display="none"},800);text=document.getElementById("pre"+c).innerText;if(window.clipboardData&&window.clipboardData.setData){return window.clipboardData.setData("Text",text)}else{if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var a=document.createElement("textarea");a.textContent=text;a.style.position="fixed";document.body.appendChild(a);a.select();try{return document.execCommand("copy")}catch(b){return false}finally{document.body.removeChild(a)}}}};</script><script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><script type='text/javascript'>
var ezoTemplate = 'pub_site';
var ezouid = '1';
var ezoFormfactor = '1';
</script><script data-ezscrex="false" type='text/javascript'>
var soc_app_id = '0';
var did = 173770;
var ezdomain = 'plantuml.com';
var ezoicSearchable = 1;
</script>
<script data-ezscrex='false' data-pagespeed-no-defer data-cfasync='false'>
function create_ezolpl() {
	var d = new Date();
	d.setTime(d.getTime() + (365*24*60*60*1000));
	var expires = "expires="+d.toUTCString();
	__ez.ck.setByCat("ezux_lpl_173770=" + new Date().getTime() + "|" + _ezaq.page_view_id + "|" + _ezaq.is_return_visitor + "; " + expires, 3);
}
function attach_ezolpl() {
	if (document.readyState === "complete") {
		create_ezolpl();
		return;
	}
	window.addEventListener("load", create_ezolpl);
}

__ez.queue.addFunc("attach_ezolpl", "attach_ezolpl", null, false, ['/detroitchicago/boise.js'], true, false, false, false);
</script></head><body><div id="left0"><div id="flex1"><div id="lll"><div class="cde"><div></div><div><span id="ezoic-pub-ad-placeholder-131"></span><!-- ezoic_pub_ad_placeholder-131-sidebar-120x600-131-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-131-sidebar-160x600-131-nonexxxnonexxxxxxezmaxscaleval100 --></div><div></div></div></div><div id="mmm"><div class="cde"><div><div><span id="ezoic-pub-ad-placeholder-105"></span><!-- ezoic_pub_ad_placeholder-105-sidebar_middle-120x240-105-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-105-sidebar_middle-125x125-105-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-105-sidebar_middle-180x150-105-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-105-sidebar_middle-200x200-105-nonexxxnonexxxxxxezmaxscaleval100 --></div><ul id="menuside2"><li><a href="index.html" class="mhov"><img src="../svgrepo-house.svg" width="16" height="16"/><span>主页</span></a></li><li><a href="news.html" class="mhov"><img src="../svgrepo-text-news.svg" width="16" height="16"/><span>新鲜</span></a></li><li><a href="starting.html" class="mhov"><img src="../svgrepo-rocket-3-start.svg" width="16" height="16"/><span>入门指南</span></a></li><li><a href="https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000" class="mhov"><img src="../svgrepo-server.svg" width="16" height="16"/><span>Online Server</span></a></li><li><a href="running.html" class="mhov"><img src="../svgrepo-play.svg" width="16" height="16"/><span>使用</span></a></li><li><a href="faq.html" class="mhov"><img src="../svgrepo-forum.svg" width="16" height="16"/><span>常见问题</span></a></li><li><a href="download.html" class="mhov"><img src="../svgrepo-add-to-online-cart.svg" width="16" height="16"/><span>下载</span></a></li><li><a href="../qa.html" class="mhov"><img src="../svgrepo-forum-message.svg" width="16" height="16"/><span>论坛 </span></a></li><li><a href="theme.html" class="mhov"><img src="../svgrepo-palette-fill.svg" width="16" height="16"/><span>Theme</span></a></li><li><a href="preprocessing.html" class="mhov"><img src="../svgrepo-cpu.svg" width="16" height="16"/><span>预处理</span></a></li><li><a href="stdlib.html" class="mhov"><img src="../svgrepo-books-library.svg" width="16" height="16"/><span>标准库</span></a></li><li><a href="https://crashedmind.github.io/PlantUMLHitchhikersGuide" class="mhov"><img src="../svgrepo-signpost-fill.svg" width="16" height="16"/><span>Hitchhiker&#39;s Guide</span></a></li><li><a href="guide.html" class="mhov"><img src="../svgrepo-library.svg" width="16" height="16"/><span>用户指南(PDF)</span></a></li></ul><div><span id="ezoic-pub-ad-placeholder-108"></span><!-- ezoic_pub_ad_placeholder-108-sidebar_middle-120x240-108-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-108-sidebar_middle-125x125-108-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-108-sidebar_middle-180x150-108-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-108-sidebar_middle-200x200-108-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><div></div><div style="margin-bottom:35px;"><span id="ezoic-pub-ad-placeholder-186"></span><!-- ezoic_pub_ad_placeholder-186-sidebar_middle-120x240-186-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-186-sidebar_middle-125x125-186-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-186-sidebar_middle-180x150-186-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-186-sidebar_middle-200x200-186-nonexxxnonexxxxxxezmaxscaleval100 --></div></div></div><div id="qqq"><div class="cd"><div class="aaa"></div><div class="bbborder"></div></div></div><div id="rrr"><div class="cd"><div class="aaa"></div><div style="height:5px;"></div><div class="bbb"><div class="cde"><div></div><div><span id="ezoic-pub-ad-placeholder-175"></span><!-- ezoic_pub_ad_placeholder-175-sidebar-120x600-175-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-175-sidebar-160x600-175-nonexxxnonexxxxxxezmaxscaleval100 --></div><div></div></div></div></div></div></div></div><style>#contmenu{display:flex;height:30px;width:100%;margin:0;padding:0}#contmenua{height:30px;padding-right:25px}#contmenub{z-index:15;display:inline-block;flex-grow:1;flex-shrink:1;height:30px;background-color:#edeff3}#magic{white-space:nowrap;overflow:hidden;z-index:14;position:fixed;top:0;right:50px;height:30px;width:30px}#magic2{white-space:nowrap;overflow:hidden;z-index:16;position:fixed;top:0;right:0;height:30px;width:50px;background-color:#edeff3}#magic2 img{margin:5px 0 0 5px;filter:invert(44%) sepia(27%) saturate(310%) hue-rotate(170deg) brightness(92%) contrast(83%)}#magic2:hover img{filter:invert(25%) sepia(97%) saturate(2026%) hue-rotate(201deg) brightness(91%) contrast(98%)}#magic:hover #svgrepoleft{filter:invert(22%) sepia(53%) saturate(4563%) hue-rotate(202deg) brightness(95%) contrast(98%)}#magic:hover{width:100%;height:31px}#aze{height:30px;display:flex;flex-direction:row-reverse}#aze1{height:30px;background-color:#edeff3}#aze2{height:30px;background-color:#edeff3;padding-left:10px;border-left:1px solid #d4d8de;border-bottom:1px solid #d4d8de}#aze1 img{filter:invert(46%) sepia(6%) saturate(1254%) hue-rotate(171deg) brightness(94%) contrast(92%)}#aze3{width:3px;height:30px;background-color:#edeff3}</style><div id="header"><div id="contmenu"><div id="contmenua"><div class="menu1"><a href="sequence-diagram.html">时序图</a><a href="use-case-diagram.html">用例图</a><a href="class-diagram.html">类图</a><a href="activity-diagram-beta.html">活动图</a><a href="component-diagram.html">组件图</a><a href="state-diagram.html">状态图</a><a href="object-diagram.html">对象图</a><a href="deployment-diagram.html">部署图</a><a href="timing-diagram.html">定时图</a><a href="nwdiag.html">Network</a><a href="salt.html">Wireframe</a><a href="archimate-diagram.html">Archimate</a><a href="gantt-diagram.html">Gantt</a><a href="mindmap-diagram.html">MindMap</a><a href="wbs-diagram.html">WBS</a><a href="json.html">JSON</a><a href="yaml.html">YAML</a></div></div><div id="contmenub"></div></div><div id="magic"><div id="aze"><div id="aze1"><img id="svgrepoleft" width="30" height="30" src="../svgrepo-left.svg"/></div><div id="aze2"><div class="menu1"><a href="sequence-diagram.html">时序图</a><a href="use-case-diagram.html">用例图</a><a href="class-diagram.html">类图</a><a href="activity-diagram-beta.html">活动图</a><a href="component-diagram.html">组件图</a><a href="state-diagram.html">状态图</a><a href="object-diagram.html">对象图</a><a href="deployment-diagram.html">部署图</a><a href="timing-diagram.html">定时图</a><a href="nwdiag.html">Network</a><a href="salt.html">Wireframe</a><a href="archimate-diagram.html">Archimate</a><a href="gantt-diagram.html">Gantt</a><a href="mindmap-diagram.html">MindMap</a><a href="wbs-diagram.html">WBS</a><a href="json.html">JSON</a><a href="yaml.html">YAML</a></div></div><div id="aze3"></div></div></div><div id="magic2"><a href="../zh-dark/sequence-diagram.html"><img src="../svgrepo-uxwing-light-mode-toggle.svg" height="20"/></a></div></div><div id="header2"></div><div id="root"><style>#haut1{margin:50px 0 20px;padding:0;min-height:80px}#donate{padding-top:5px;min-height:30px}</style><div id="haut1"><div style="float:left;"><div class="breadcrumb"><a href="sitemap.html">PlantUML</a><a href="sitemap-language-specification.html">Language specification</a><a href="sequence-diagram.html">Sequence Diagram</a><a href="sequence-diagram.html#"></a></div><div id="donate">   <a href="https://discord.gg/sXhzexAQGh" style="text-decoration: none;"><img src="https://img.shields.io/discord/1083727021328306236?color=5865F2&amp;logo=discord&amp;logoColor=white" alt="Discord server"/></a>   <a href="https://github.com/sponsors/plantuml/" style="text-decoration: none;"><img src="https://img.shields.io/github/sponsors/plantuml?logo=github"/></a>   <a href="https://www.patreon.com/bePatron?patAmt=1&amp;u=527450&amp;rid=152970" style="text-decoration: none;"><img src="https://img.shields.io/badge/patreon-122-chocolate?logo=patreon"/></a>   <a href="../lp.html" style="text-decoration: none;"><img src="https://img.shields.io/liberapay/patrons/plantuml?color=gold&amp;logo=liberapay&amp;label=liberapay"/></a>   <a href="../en/paypal.html" style="text-decoration: none;"><img src="https://img.shields.io/badge/paypal-296-skyblue?logo=paypal&amp;logoColor=red"/></a></div></div><div style="float:right; margin:3px 0;"><style>#langlist{display:flex;justify-content:space-between;width:317px;height:16px;margin:3px 10px 3px 0}.sel2{border:2px solid #fefefe}.nosel2{border:2px solid #fefefe;filter:grayscale(100%) opacity(75%)}.sel2:hover,.nosel2:hover{cursor:pointer;border:2px solid #0366d6;border-spacing:0;filter:grayscale(0);filter:contrast(200%);filter:brightness(150%)}#flag1,#flag2,#flag3,#flag4,#flag5,#flag6,#flag7,#flag8{background:url(../flags21.png);background-repeat:no-repeat;background-clip:content-box;width:22px;height:16px}#flag2{background-position:-22px 0}#flag3{background-position:-44px 0}#flag4{background-position:-66px 0}#flag5{background-position:-88px 0}#flag6{background-position:-110px 0}#flag7{background-position:-132px 0}#flag8{background-position:-154px 0}</style><div id="langlist"><div id="flag1" onclick="location.href=&#39;/en/sequence-diagram&#39;" class="nosel2"></div><div id="flag2" onclick="location.href=&#39;/de/sequence-diagram&#39;" class="nosel2"></div><div id="flag3" onclick="location.href=&#39;/es/sequence-diagram&#39;" class="nosel2"></div><div id="flag4" onclick="location.href=&#39;/fr/sequence-diagram&#39;" class="nosel2"></div><div id="flag5" onclick="location.href=&#39;/ja/sequence-diagram&#39;" class="nosel2"></div><div id="flag6" onclick="location.href=&#39;/ko/sequence-diagram&#39;" class="nosel2"></div><div id="flag7" onclick="location.href=&#39;/ru/sequence-diagram&#39;" class="nosel2"></div><div id="flag8" onclick="location.href=&#39;/zh/sequence-diagram&#39;" class="sel2"></div></div></div></div><p><style>#topsticky{z-index:2;margin:0 240px 0 0}@media screen and (min-height:800px){#topsticky{position:sticky;top:40px}}@media screen and (max-width:1500px){#topsticky{margin:0}}</style></p><div id="topsticky"><span id="ezoic-pub-ad-placeholder-647"></span><!-- ezoic_pub_ad_placeholder-647-under_page_title-320x100-647-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-647-under_page_title-300x50v2-647-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-647-under_page_title-320x50-647-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-647-under_page_title-468x60-647-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-647-under_page_title-728x90-647-nonexxxnonexxxxxxezmaxscaleval100 --></div><p><a style="position:relative;top:-38px;" name="b44a7c9534b97e5d"></a><style>#toc{z-index:2;position:sticky;top:40px;list-style-type:none;margin:0;padding:0 10px}.chap{clear:both}#toc ul{list-style-type:none;max-height:87vh;overflow-y:auto;background:#f6f8fa;border-width:2px;border-style:groove;border-radius:3px;border-color:#e1e4e8;margin:0;padding:0}@media screen and (min-height:450px){#toc ul{max-height:89.5vh}}@media screen and (min-height:550px){#toc ul{max-height:91.5vh}}@media screen and (min-height:700px){#toc ul{max-height:93.5vh}}@media screen and (min-height:900px){#toc ul{max-height:94.5vh}}#toc li{margin:5px 5px 5px 10px;padding:0}@media screen and (max-width:1500px){#toctd{display:none}#toc{display:none}}</style><table border="0" cellspacing="0" cellpadding="0" width="100%"><tbody><tr valign="top" width="100%"><td valign="top"><h1 class="chap"><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#0"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#0"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#0"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>序列图</h1><p></p> 使用 PlantUML 创建序列图非常简单。这种易用性主要归功于其语法的用户友好性，既直观又易记。 <p></p><ul><li><strong>直观的语法：</strong></li></ul> 首先，用户非常欣赏 PlantUML 所采用的简单直观的语法。这种经过深思熟虑的设计意味着，即使是图表创建新手也能轻松快速地掌握基础知识。 <p></p><ul><li><strong>文本与图形的关联：</strong></li></ul> 另一个显著特点是文本表示与图形输出之间非常相似。这种和谐的相关性可确保文本草稿准确地转化为图形图表，从而提供连贯、可预测的设计体验，在最终输出中不会出现令人不快的意外。 <p></p><ul><li><strong>高效的制作过程：</strong></li></ul> 文本和图形结果之间的紧密联系不仅简化了制作过程，还大大加快了制作速度。用户可从更简化的流程中获益，减少耗时的修改和调整要求。 <p></p><ul><li><strong>起草时的可视化：</strong></li></ul> 在起草文本的同时就能设想最终的图形结果，这是许多人认为非常宝贵的一项功能。它自然而然地促进了从初稿到最终呈现的顺利过渡，提高了工作效率，降低了出错的可能性。 <p></p><ul><li><strong>易于编辑和修改：</strong></li></ul> 重要的是，编辑现有图表的过程非常简便。由于图表是由文本生成的，用户会发现进行调整比使用图形工具修改图像要容易得多，也精确得多。 <p></p> PlantUML 为创建和编辑序列图提供了一种简单明了、用户友好的方法，既能满足新手的需求，也能满足经验丰富的设计人员的需求。它巧妙地利用文本输入的简便性来制作具有视觉描述性和准确性的图表，从而使自己成为图表创建工具包中的必备工具。 <p></p> 您可以了解更多有关<a href="commons.html">PlantUML 中</a>一些<a href="commons.html">常用命令</a>的信息，以增强您的图表创建体验。 <a style="position:relative;top:-38px;" name="7aea6e3ecced51f5"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#1"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#1"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#1"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>基本的例子</h2> 序列<code class="cod">-&gt;</code> 用于绘制两个 参与者之间的信息。 参与者不必明确声明。 <p></p> 要有一个点状的箭头，就用<code class="cod">--&gt;</code><p></p> 也可以用<code class="cod">&lt;-</code> 和<code class="cod">&lt;--</code> 。 这不会改变绘图，但可能提高可读性。 注意，这只适用于顺序图，其他图的规则不同。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msge4750b5b171330f2492d7c2b31d245dc" class="msg"> 🎉 Copied! </div><img width="16" height="16" id="imge4750b5b171330f2492d7c2b31d245dc" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;e4750b5b171330f2492d7c2b31d245dc&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;e4750b5b171330f2492d7c2b31d245dc&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;e4750b5b171330f2492d7c2b31d245dc&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pree4750b5b171330f2492d7c2b31d245dc">@startuml
Alice -&gt; Bob: Authentication Request
Bob --&gt; Alice: Authentication Response

Alice -&gt; Bob: Another authentication Request
Alice &lt;-- Bob: Another authentication Response
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="267" height="214" class="scale" src="../imgw/img-e4750b5b171330f2492d7c2b31d245dc.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><center><div class="tago">WARNING</div> <b>This translation need to be updated.</b> <div class="tago">WARNING</div></center><a style="position:relative;top:-38px;" name="5d2ed256d73a7298"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-179"></span><!-- ezoic_pub_ad_placeholder-179-under_second_paragraph-234x60-179-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-179-under_second_paragraph-468x60-179-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-179-under_second_paragraph-728x90-179-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-179-under_second_paragraph-970x90-179-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#2"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#2"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#2"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>声明参与者</h2><p></p> 如果使用关键字<code class="cod">participant</code> 来声明参与者，就可以对该参与者进行更多的控制。 <p></p> 声明的顺序将是（默认的）<strong>显示顺序</strong>。 <p></p> 使用这些其他的关键字来声明参与者，将<strong>改变</strong>参与者的表示<strong>形状</strong>。 <ul><li><code class="cod">actor</code>（角色）</li><li><code class="cod">boundary</code>（边界）</li><li><code class="cod">control</code>（控制）</li><li><code class="cod">entity</code>（实体）</li><li><code class="cod">database</code>（数据库）</li><li><code class="cod">collections</code>（集合）</li><li><code class="cod">queue</code>（队列）</li></ul><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msga45a2bd161900518177ba43b5a9c70b2" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imga45a2bd161900518177ba43b5a9c70b2" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;a45a2bd161900518177ba43b5a9c70b2&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;a45a2bd161900518177ba43b5a9c70b2&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;a45a2bd161900518177ba43b5a9c70b2&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prea45a2bd161900518177ba43b5a9c70b2">@startuml
participant Participant as Foo
actor       Actor       as Foo1
boundary    Boundary    as Foo2
control     Control     as Foo3
entity      Entity      as Foo4
database    Database    as Foo5
collections Collections as Foo6
queue       Queue       as Foo7
Foo -&gt; Foo1 : To actor 
Foo -&gt; Foo2 : To boundary
Foo -&gt; Foo3 : To control
Foo -&gt; Foo4 : To entity
Foo -&gt; Foo5 : To database
Foo -&gt; Foo6 : To collections
Foo -&gt; Foo7: To queue
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="579" height="396" class="scale" src="../imgw/img-a45a2bd161900518177ba43b5a9c70b2.png"/></div></div></td></tr></tbody></table></p><p></p><p></p> 使用<code class="cod">as</code> 关键字重命名参与者。 <p></p> 你也可以改变 演员或参与者的背景<a href="color.html">颜色</a>。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg976fa1b1ecf0e84af154a75b422fabb3" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img976fa1b1ecf0e84af154a75b422fabb3" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;976fa1b1ecf0e84af154a75b422fabb3&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;976fa1b1ecf0e84af154a75b422fabb3&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;976fa1b1ecf0e84af154a75b422fabb3&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre976fa1b1ecf0e84af154a75b422fabb3">@startuml
actor Bob #red
&#39; The only difference between actor
&#39;and participant is the drawing
participant Alice
participant &#34;I have a really\nlong name&#34; as L #99FF99
/&#39; You can also declare:
   participant L as &#34;I have a really\nlong name&#34;  #99FF99
  &#39;/

Alice-&gt;Bob: Authentication Request
Bob-&gt;Alice: Authentication Response
Bob-&gt;L: Log transaction
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="328" height="274" class="scale" src="../imgw/img-976fa1b1ecf0e84af154a75b422fabb3.png"/></div></div></td></tr></tbody></table></p><p></p><p></p> 您可以使用<code class="cod">order</code> 关键字来定制参与者的显示顺序。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg96a04088f1121e8f353cf2c444a559b6" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img96a04088f1121e8f353cf2c444a559b6" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;96a04088f1121e8f353cf2c444a559b6&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;96a04088f1121e8f353cf2c444a559b6&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;96a04088f1121e8f353cf2c444a559b6&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre96a04088f1121e8f353cf2c444a559b6">@startuml
participant Last order 30
participant Middle order 20
participant First order 10
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="168" height="93" class="scale" src="../imgw/img-96a04088f1121e8f353cf2c444a559b6.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="6c2a1c77df70f96d"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#3"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#3"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#3"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>多行定义参与者</h2><p></p> 你可以对参与者使用多行定义。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgec6ef8274546b468161a95a8bc960ab1" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgec6ef8274546b468161a95a8bc960ab1" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;ec6ef8274546b468161a95a8bc960ab1&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;ec6ef8274546b468161a95a8bc960ab1&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;ec6ef8274546b468161a95a8bc960ab1&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="preec6ef8274546b468161a95a8bc960ab1">@startuml
participant Participant [
    =Title
    ----
    &#34;&#34;打算&#34;&#34;
]

participant Bob

Participant -&gt; Bob
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="111" height="173" class="scale" src="../imgw/img-ec6ef8274546b468161a95a8bc960ab1.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/15232/">QA-15232</a>]</em><a style="position:relative;top:-38px;" name="2210ebadb5117709"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-114"></span><!-- ezoic_pub_ad_placeholder-114-mid_content-234x60-114-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-114-mid_content-468x60-114-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-114-mid_content-728x90-114-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-114-mid_content-970x90-114-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#4"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#4"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#4"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>在参与者中使用非字母</h2><p></p><p></p> 你可以使用引号来定义参与者。 而且你可以使用<code class="cod">as</code> 关键字来给这些参与者一个别名。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg981b3f69d60148b3eec97c8bd74a071a" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img981b3f69d60148b3eec97c8bd74a071a" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;981b3f69d60148b3eec97c8bd74a071a&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;981b3f69d60148b3eec97c8bd74a071a&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;981b3f69d60148b3eec97c8bd74a071a&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre981b3f69d60148b3eec97c8bd74a071a">@startuml
Alice -&gt; &#34;Bob()&#34; : Hello
&#34;Bob()&#34; -&gt; &#34;This is very\nlong&#34; as Long
&#39; You can also declare:
&#39; &#34;Bob()&#34; -&gt; Long as &#34;This is very\nlong&#34;
Long --&gt; &#34;Bob()&#34; : ok
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="209" height="203" class="scale" src="../imgw/img-981b3f69d60148b3eec97c8bd74a071a.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="f5050860884ddf31"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#5"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#5"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#5"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>给自己发消息</h2><p></p> 参与者可以给自己发信息， <p></p> 消息文字可以用<code class="cod">\n</code>来换行。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg3c4e3edd75ee796fe334c961ecb46cf7" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img3c4e3edd75ee796fe334c961ecb46cf7" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;3c4e3edd75ee796fe334c961ecb46cf7&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;3c4e3edd75ee796fe334c961ecb46cf7&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;3c4e3edd75ee796fe334c961ecb46cf7&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre3c4e3edd75ee796fe334c961ecb46cf7">@startuml
Alice -&gt; Alice: This is a signal to self.\nIt also demonstrates\nmultiline \ntext
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="170" height="185" class="scale" src="../imgw/img-3c4e3edd75ee796fe334c961ecb46cf7.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg96a7a20f79dc06d1fa43f4d16595beac" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img96a7a20f79dc06d1fa43f4d16595beac" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;96a7a20f79dc06d1fa43f4d16595beac&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;96a7a20f79dc06d1fa43f4d16595beac&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;96a7a20f79dc06d1fa43f4d16595beac&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre96a7a20f79dc06d1fa43f4d16595beac">@startuml
Alice &lt;- Alice: This is a signal to self.\nIt also demonstrates\nmultiline \ntext
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="171" height="185" class="scale" src="../imgw/img-96a7a20f79dc06d1fa43f4d16595beac.png"/></div></div></td></tr></tbody></table></p><p> *[Ref. [QA-1361](https://forum.plantuml.net/1361)]* <a style="position:relative;top:-38px;" name="bf6bee6d96403148"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-115"></span><!-- ezoic_pub_ad_placeholder-115-long_content-234x60-115-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-115-long_content-468x60-115-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-115-long_content-728x90-115-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-115-long_content-970x90-115-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#6"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#6"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#6"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>文本对齐</h2><p></p> 箭头上的文本对齐可以用<code class="cod">skinparam sequenceMessageAlign</code>，后接参数<code class="cod">left</code>,<code class="cod">right</code>或<code class="cod">center</code>。 <p></p> 你也可以使用<code class="cod">direction</code>或<code class="cod">reverseDirection</code>来根据箭头的方向对齐文本。更多细节可参考<a href="skinparam.html">skinparam</a>。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgc46d21f5eb6779fac63bc3a899d29fb4" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgc46d21f5eb6779fac63bc3a899d29fb4" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;c46d21f5eb6779fac63bc3a899d29fb4&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;c46d21f5eb6779fac63bc3a899d29fb4&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;c46d21f5eb6779fac63bc3a899d29fb4&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prec46d21f5eb6779fac63bc3a899d29fb4">@startuml
skinparam sequenceMessageAlign right
Bob -&gt; Alice : Request
Alice -&gt; Bob : Response
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="133" height="153" class="scale" src="../imgw/img-c46d21f5eb6779fac63bc3a899d29fb4.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><h3>让响应信息显示在箭头下面</h3><p></p> 你可以使用<code class="cod">skinparam responseMessageBelowArrow true</code>命令，让响应信息显示在箭头下面。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgd8f1e6226a21d17c0d5d37b9d79d4b3e" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgd8f1e6226a21d17c0d5d37b9d79d4b3e" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;d8f1e6226a21d17c0d5d37b9d79d4b3e&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;d8f1e6226a21d17c0d5d37b9d79d4b3e&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;d8f1e6226a21d17c0d5d37b9d79d4b3e&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pred8f1e6226a21d17c0d5d37b9d79d4b3e">@startuml
skinparam responseMessageBelowArrow true
Bob -&gt; Alice : hello
Alice -&gt; Bob : ok
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="103" height="153" class="scale" src="../imgw/img-d8f1e6226a21d17c0d5d37b9d79d4b3e.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="efeda651e89e596c"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#7"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#7"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#7"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>改变箭头样式</h2><p></p> 您可以通过以下几种方式改变箭头样式： <ul><li>添加最后的<code class="cod">x</code> 表示丢失的信息</li><li>使用<code class="cod">\</code> 或<code class="cod">/</code> 而不是<code class="cod">&lt;</code> 或<code class="cod">&gt;</code> 只拥有箭头的底部或顶部部分</li><li>重复箭头头（例如<code class="cod">&gt;&gt;</code> 或<code class="cod">//</code> ）头，拥有一个薄的图纸</li><li>使用<code class="cod">--</code> 而不是<code class="cod">-</code> 拥有一个点状箭头</li><li>在箭头头添加最后的 &#34;o&#34;</li><li>使用双向的箭头<code class="cod">&lt;-&gt;</code></li></ul><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgcb2336c0439c255b09fb06ba21605875" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgcb2336c0439c255b09fb06ba21605875" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;cb2336c0439c255b09fb06ba21605875&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;cb2336c0439c255b09fb06ba21605875&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;cb2336c0439c255b09fb06ba21605875&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="precb2336c0439c255b09fb06ba21605875">@startuml
Bob -&gt;x Alice
Bob -&gt; Alice
Bob -&gt;&gt; Alice
Bob -\ Alice
Bob \\- Alice
Bob //-- Alice

Bob -&gt;o Alice
Bob o\\-- Alice

Bob &lt;-&gt; Alice
Bob &lt;-&gt;o Alice
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="103" height="233" class="scale" src="../imgw/img-cb2336c0439c255b09fb06ba21605875.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="0b2e57c3d4eafdda"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-116"></span><!-- ezoic_pub_ad_placeholder-116-longer_content-234x60-116-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-116-longer_content-468x60-116-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-116-longer_content-728x90-116-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-116-longer_content-970x90-116-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#8"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#8"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#8"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>修改箭头颜色</h2><p></p> 你可以用以下记号修改箭头的颜色： <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgdbed5025158030af2384d4c00243561b" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgdbed5025158030af2384d4c00243561b" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;dbed5025158030af2384d4c00243561b&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;dbed5025158030af2384d4c00243561b&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;dbed5025158030af2384d4c00243561b&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="predbed5025158030af2384d4c00243561b">@startuml
Bob -[#red]&gt; Alice : hello
Alice -[#0000FF]-&gt;Bob : ok
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="103" height="153" class="scale" src="../imgw/img-dbed5025158030af2384d4c00243561b.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="ce3f7eb577ad5f4d"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#9"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#9"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#9"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>对消息序列编号</h2><p></p><p></p> 关键字 <code class="cod">autonumber</code> 用于自动对消息编号。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg4c062644f7f56d4cef78d82554773600" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img4c062644f7f56d4cef78d82554773600" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;4c062644f7f56d4cef78d82554773600&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;4c062644f7f56d4cef78d82554773600&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;4c062644f7f56d4cef78d82554773600&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre4c062644f7f56d4cef78d82554773600">@startuml
autonumber
Bob -&gt; Alice : Authentication Request
Bob &lt;- Alice : Authentication Response
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="231" height="153" class="scale" src="../imgw/img-4c062644f7f56d4cef78d82554773600.png"/></div></div></td></tr></tbody></table></p><p></p><p></p> 语句 <code class="cod">autonumber //start//</code> 用于指定编号的初始值，而 <code class="cod">autonumber //start// //increment//</code> 可以同时指定编号的初始值和每次增加的值。 <p></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msga52e5ffb11f429bbb94a747efee9abe2" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imga52e5ffb11f429bbb94a747efee9abe2" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;a52e5ffb11f429bbb94a747efee9abe2&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;a52e5ffb11f429bbb94a747efee9abe2&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;a52e5ffb11f429bbb94a747efee9abe2&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prea52e5ffb11f429bbb94a747efee9abe2">@startuml
autonumber
Bob -&gt; Alice : Authentication Request
Bob &lt;- Alice : Authentication Response

autonumber 15
Bob -&gt; Alice : Another authentication Request
Bob &lt;- Alice : Another authentication Response

autonumber 40 10
Bob -&gt; Alice : Yet another authentication Request
Bob &lt;- Alice : Yet another authentication Response

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="307" height="275" class="scale" src="../imgw/img-a52e5ffb11f429bbb94a747efee9abe2.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p> 你可以在双引号内指定编号的格式。 <p></p> 格式是由 Java 的<code class="cod">DecimalFormat</code>类实现的： (<code class="cod">0</code> 表示数字；<code class="cod">#</code> 也表示数字，但默认为0)。 <p></p> 你也可以用 HTML 标签来制定格式。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg555196e5b9079ccf36f19137367ca5c5" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img555196e5b9079ccf36f19137367ca5c5" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;555196e5b9079ccf36f19137367ca5c5&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;555196e5b9079ccf36f19137367ca5c5&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;555196e5b9079ccf36f19137367ca5c5&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre555196e5b9079ccf36f19137367ca5c5">@startuml
autonumber &#34;&lt;b&gt;[000]&#34;
Bob -&gt; Alice : Authentication Request
Bob &lt;- Alice : Authentication Response

autonumber 15 &#34;&lt;b&gt;(&lt;u&gt;##&lt;/u&gt;)&#34;
Bob -&gt; Alice : Another authentication Request
Bob &lt;- Alice : Another authentication Response

autonumber 40 10 &#34;&lt;font color=red&gt;&lt;b&gt;Message 0  &#34;
Bob -&gt; Alice : Yet another authentication Request
Bob &lt;- Alice : Yet another authentication Response

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="374" height="275" class="scale" src="../imgw/img-555196e5b9079ccf36f19137367ca5c5.png"/></div></div></td></tr></tbody></table></p><p></p><p></p> 你还可以用语句 <code class="cod">autonumber stop</code> 和 <code class="cod">autonumber resume //increment// //format//</code> 来表示暂停或继续使用自动编号。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgc16394bd5024b64957afe9f67c3f85cc" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgc16394bd5024b64957afe9f67c3f85cc" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;c16394bd5024b64957afe9f67c3f85cc&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;c16394bd5024b64957afe9f67c3f85cc&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;c16394bd5024b64957afe9f67c3f85cc&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prec16394bd5024b64957afe9f67c3f85cc">@startuml
autonumber 10 10 &#34;&lt;b&gt;[000]&#34;
Bob -&gt; Alice : Authentication Request
Bob &lt;- Alice : Authentication Response

autonumber stop
Bob -&gt; Alice : dummy

autonumber resume &#34;&lt;font color=red&gt;&lt;b&gt;Message 0  &#34;
Bob -&gt; Alice : Yet another authentication Request
Bob &lt;- Alice : Yet another authentication Response

autonumber stop
Bob -&gt; Alice : dummy

autonumber resume 1 &#34;&lt;font color=blue&gt;&lt;b&gt;Message 0  &#34;
Bob -&gt; Alice : Yet another authentication Request
Bob &lt;- Alice : Yet another authentication Response
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="374" height="336" class="scale" src="../imgw/img-c16394bd5024b64957afe9f67c3f85cc.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p> 你也可以使用一个2或3位的序列，中间采用一种或几种分隔符，如<code class="cod">.</code>,<code class="cod">;</code>,<code class="cod">,</code>,<code class="cod">:</code>。例如：<code class="cod">1.1.1</code> 或<code class="cod">1.1:1</code> 。 <p></p> 最后一位数字会自动递增。 <p></p> 要增加第一个数字，请使用：<code class="cod">autonumber inc A</code> 。要增加第二位数字，请使用：<code class="cod">autonumber inc B</code> 。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg51311be785da02860b3311fd77696321" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img51311be785da02860b3311fd77696321" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;51311be785da02860b3311fd77696321&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;51311be785da02860b3311fd77696321&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;51311be785da02860b3311fd77696321&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre51311be785da02860b3311fd77696321">@startuml
autonumber 1.1.1
Alice -&gt; Bob: Authentication request
Bob --&gt; Alice: Response

autonumber inc A
&#39;Now we have 2.1.1
Alice -&gt; Bob: Another authentication request
Bob --&gt; Alice: Response

autonumber inc B
&#39;Now we have 2.2.1
Alice -&gt; Bob: Another authentication request
Bob --&gt; Alice: Response

autonumber inc A
&#39;Now we have 3.1.1
Alice -&gt; Bob: Another authentication request
autonumber inc B
&#39;Now we have 3.2.1
Bob --&gt; Alice: Response
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="285" height="336" class="scale" src="../imgw/img-51311be785da02860b3311fd77696321.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p> 你也可以用<code class="cod">autonumber</code> 的值，带有<code class="cod">%autonumber%</code> 变量。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg1a093e8a94d4630ab604c581dccf31c3" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img1a093e8a94d4630ab604c581dccf31c3" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;1a093e8a94d4630ab604c581dccf31c3&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;1a093e8a94d4630ab604c581dccf31c3&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;1a093e8a94d4630ab604c581dccf31c3&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre1a093e8a94d4630ab604c581dccf31c3">@startuml
autonumber 10
Alice -&gt; Bob
note right
  the &lt;U+0025&gt;autonumber&lt;U+0025&gt; works everywhere.
  Here, its value is ** %autonumber% **
end note
Bob --&gt; Alice: //This is the response %autonumber%//
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="461" height="176" class="scale" src="../imgw/img-1a093e8a94d4630ab604c581dccf31c3.png"/></div></div></td></tr></tbody></table></p><p><em>[Ref.<a href="https://forum.plantuml.net/7119/create-links-after-creating-a-diagram?show=7137#a7137">QA-7119</a>]</em><a style="position:relative;top:-38px;" name="77852febc7dde952"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-117"></span><!-- ezoic_pub_ad_placeholder-117-longest_content-234x60-117-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-117-longest_content-468x60-117-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-117-longest_content-728x90-117-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-117-longest_content-970x90-117-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#10"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#10"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#10"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>页面标题、页眉和页脚</h2><p></p><code class="cod">title</code> 关键字用于为页面添加标题。 <p></p> 页面可以使用<code class="cod">header</code> 和<code class="cod">footer</code> 显示页眉和页脚。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgfbdca738b14c96ea3de5cb815125e7e5" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgfbdca738b14c96ea3de5cb815125e7e5" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;fbdca738b14c96ea3de5cb815125e7e5&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;fbdca738b14c96ea3de5cb815125e7e5&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;fbdca738b14c96ea3de5cb815125e7e5&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prefbdca738b14c96ea3de5cb815125e7e5">@startuml

header Page Header
footer Page %page% of %lastpage%

title Example Title

Alice -&gt; Bob : message 1
Alice -&gt; Bob : message 2

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="145" height="222" class="scale" src="../imgw/img-fbdca738b14c96ea3de5cb815125e7e5.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="45d7d5b32d17a0f9"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#11"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#11"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#11"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>分割示意图</h2><p></p><p></p> 关键字 <code class="cod">newpage</code> 用于把一张图分割成多张。 <p></p> 在 <code class="cod">newpage</code> 之后添加文字，作为新的示意图的标题。 <p></p> 这样就能很方便地在 <em>Word</em> 中将长图分几页打印。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgd7e7cc657c2ae3212ead29e446f39e37" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgd7e7cc657c2ae3212ead29e446f39e37" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;d7e7cc657c2ae3212ead29e446f39e37&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;d7e7cc657c2ae3212ead29e446f39e37&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;d7e7cc657c2ae3212ead29e446f39e37&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pred7e7cc657c2ae3212ead29e446f39e37">@startuml

Alice -&gt; Bob : message 1
Alice -&gt; Bob : message 2

newpage

Alice -&gt; Bob : message 3
Alice -&gt; Bob : message 4

newpage A title for the\nlast page

Alice -&gt; Bob : message 5
Alice -&gt; Bob : message 6
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="145" height="154" class="scale" src="../imgw/img-d7e7cc657c2ae3212ead29e446f39e37.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="425ba4350c02142c"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-118"></span><!-- ezoic_pub_ad_placeholder-118-incontent_5-234x60-118-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-118-incontent_5-468x60-118-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-118-incontent_5-728x90-118-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-118-incontent_5-970x90-118-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#12"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#12"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#12"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>组合消息</h2><p></p><p></p> 我们可以通过以下关键词来组合消息： <ul><li><code class="cod">alt/else</code></li><li><code class="cod">opt</code></li><li><code class="cod">loop</code></li><li><code class="cod">par</code></li><li><code class="cod">break</code></li><li><code class="cod">critical</code></li><li><code class="cod">group</code>, 后面紧跟着消息内容</li></ul><p></p><p></p> 可以在标头(header)添加需要显示的文字(对于<code class="cod">group</code>关键字，参看下一章节 <em>&#39;次级分组标签&#39;</em>)。 <p></p> 关键词 <code class="cod">end</code> 用来结束分组。 <p></p> 注意，分组可以嵌套使用。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg05ae291545a4bb97918bbc1a0f4258c0" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img05ae291545a4bb97918bbc1a0f4258c0" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;05ae291545a4bb97918bbc1a0f4258c0&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;05ae291545a4bb97918bbc1a0f4258c0&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;05ae291545a4bb97918bbc1a0f4258c0&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre05ae291545a4bb97918bbc1a0f4258c0">@startuml
Alice -&gt; Bob: 认证请求

alt 成功情况

    Bob -&gt; Alice: 认证接受

else 某种失败情况

    Bob -&gt; Alice: 认证失败
    group 我自己的标签
    Alice -&gt; Log : 开始记录攻击日志
        loop 1000次
            Alice -&gt; Bob: DNS 攻击
        end
    Alice -&gt; Log : 结束记录攻击日志
    end

else 另一种失败

   Bob -&gt; Alice: 请重复

end
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="236" height="434" class="scale" src="../imgw/img-05ae291545a4bb97918bbc1a0f4258c0.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="7aad256d9e87308c"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#13"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#13"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#13"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>次级分组标签</h2><p></p> 对于<code class="cod">group</code>而言，在标头处的<code class="cod">[</code>和<code class="cod">]</code>之间可以显示次级文本或标签。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg919fd3a2f68d4d8577906c26f272b063" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img919fd3a2f68d4d8577906c26f272b063" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;919fd3a2f68d4d8577906c26f272b063&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;919fd3a2f68d4d8577906c26f272b063&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;919fd3a2f68d4d8577906c26f272b063&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre919fd3a2f68d4d8577906c26f272b063">@startuml
Alice -&gt; Bob: 认证请求
Bob -&gt; Alice: 认证失败
group 我自己的标签 [我自己的标签2]
    Alice -&gt; Log : 开始记录攻击日志
    loop 1000次
        Alice -&gt; Bob: DNS攻击
    end
    Alice -&gt; Log : 结束记录攻击日志
end
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="242" height="309" class="scale" src="../imgw/img-919fd3a2f68d4d8577906c26f272b063.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[参看 <a href="https://forum.plantuml.net/2503">QA-2503</a>]</em><a style="position:relative;top:-38px;" name="012d3e8694a98cc1"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-119"></span><!-- ezoic_pub_ad_placeholder-119-incontent_6-234x60-119-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-119-incontent_6-468x60-119-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-119-incontent_6-728x90-119-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-119-incontent_6-970x90-119-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#14"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#14"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#14"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>注释信息</h2><p></p> 可以使用<code class="cod">note left</code> 或<code class="cod">note right</code> 关键字<em>在信息后面</em>加上注释。 <p></p> 你可以使用<code class="cod">end note</code> 关键字有一个多行注释。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg1061f7d90a8d119a055f80db2c985c4e" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img1061f7d90a8d119a055f80db2c985c4e" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;1061f7d90a8d119a055f80db2c985c4e&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;1061f7d90a8d119a055f80db2c985c4e&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;1061f7d90a8d119a055f80db2c985c4e&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre1061f7d90a8d119a055f80db2c985c4e">@startuml
Alice-&gt;Bob : hello
note left: this is a first note

Bob-&gt;Alice : ok
note right: this is another note

Bob-&gt;Bob : I am thinking
note left
a note
can also be defined
on several lines
end note
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="325" height="234" class="scale" src="../imgw/img-1061f7d90a8d119a055f80db2c985c4e.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="f8c59a77112b60e7"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#15"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#15"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#15"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>其他的注释信息方式</h2><p></p><p></p> 可以使用<code class="cod">note left of</code>，<code class="cod">note right of</code>或<code class="cod">note over</code>在节点(participant)的相对位置放置注释。 <p></p> 还可以通过修改<a href="color.html">背景色</a>来高亮显示注释。 <p></p> 以及使用关键字<code class="cod">end note</code>来添加多行注释。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg1c741a8f182767ea1f712678f04ef027" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img1c741a8f182767ea1f712678f04ef027" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;1c741a8f182767ea1f712678f04ef027&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;1c741a8f182767ea1f712678f04ef027&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;1c741a8f182767ea1f712678f04ef027&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre1c741a8f182767ea1f712678f04ef027">@startuml
participant Alice
participant Bob
note left of Alice #aqua
This is displayed
left of Alice.
end note

note right of Alice: This is displayed right of Alice.

note over Alice: This is displayed over Alice.

note over Alice, Bob #FFAAAA: This is displayed\n over Bob and Alice.

note over Bob, Alice
This is yet another
example of
a long note.
end note
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="337" height="340" class="scale" src="../imgw/img-1c741a8f182767ea1f712678f04ef027.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="84de38ea1ca38165"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-120"></span><!-- ezoic_pub_ad_placeholder-120-incontent_7-234x60-120-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-120-incontent_7-468x60-120-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-120-incontent_7-728x90-120-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-120-incontent_7-970x90-120-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#16"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#16"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#16"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>改变备注框的形状 [hnote和rnote]</h2><p></p> 你可以使用 <code class="cod">hnote</code> 和 <code class="cod">rnote</code> 这两个关键字来修改备注框的形状： <ul><li><code class="cod">hnote</code>代表六边形（hexagonal）的备注框；</li><li><code class="cod">rnote</code>代表正方形（rectangle）的备注框。</li></ul><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg2be27710ff165d97e408f8a590c12805" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img2be27710ff165d97e408f8a590c12805" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;2be27710ff165d97e408f8a590c12805&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;2be27710ff165d97e408f8a590c12805&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;2be27710ff165d97e408f8a590c12805&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre2be27710ff165d97e408f8a590c12805">@startuml
caller -&gt; server : conReq
hnote over caller : 空闲
caller &lt;- server : conConf
rnote over server
 &#34;r&#34;是正方形
 &#34;h&#34;是六边形
endrnote
rnote over server
 多
 行
 文本
endrnote
hnote over caller
 多
 行
 文本
endhnote
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="144" height="373" class="scale" src="../imgw/img-2be27710ff165d97e408f8a590c12805.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[参见 <a href="https://forum.plantuml.net/1765/is-it-possible-to-have-different-shapes-for-notes?show=1806#c1806">QA-1765</a>]</em><a style="position:relative;top:-38px;" name="39755e6414c00844"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#17"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#17"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#17"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>在多个参与者添加备注 [across]</h2><p></p> 你可以之直接在所有参与者之间添加备注，格式是： <ul><li><code class="cod">note across: 备注描述</code></li></ul><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg6ddfe0bb91d7bf22fa30b09889aac0b0" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img6ddfe0bb91d7bf22fa30b09889aac0b0" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;6ddfe0bb91d7bf22fa30b09889aac0b0&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;6ddfe0bb91d7bf22fa30b09889aac0b0&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;6ddfe0bb91d7bf22fa30b09889aac0b0&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre6ddfe0bb91d7bf22fa30b09889aac0b0">@startuml
Alice-&gt;Bob:m1
Bob-&gt;Charlie:m2
note over Alice, Charlie: 创建跨越所有参与者的备注的旧方法：\n &#34;&#34;note over //FirstPart, LastPart//&#34;&#34;.
note across: 新方法：\n&#34;&#34;note across&#34;&#34;
Bob-&gt;Alice
hnote across: 跨越所有参与者的备注。
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="272" height="308" class="scale" src="../imgw/img-6ddfe0bb91d7bf22fa30b09889aac0b0.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[参见 <a href="https://forum.plantuml.net/9738">QA-9738</a>]</em><a style="position:relative;top:-38px;" name="7514641e1b91c8ee"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-121"></span><!-- ezoic_pub_ad_placeholder-121-incontent_8-234x60-121-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-121-incontent_8-468x60-121-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-121-incontent_8-728x90-121-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-121-incontent_8-970x90-121-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#18"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#18"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#18"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>在同一级对齐多个备注 [/]</h2><p></p> 使用<code class="cod">/</code>可以在同一级对齐多个备注： <ul><li>没有<code class="cod">/</code><em>（默认情况下，备注不是对齐的。）</em></li></ul><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg0a9f7dee79bea48e0aeb0c62fe322368" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img0a9f7dee79bea48e0aeb0c62fe322368" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;0a9f7dee79bea48e0aeb0c62fe322368&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;0a9f7dee79bea48e0aeb0c62fe322368&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;0a9f7dee79bea48e0aeb0c62fe322368&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre0a9f7dee79bea48e0aeb0c62fe322368">@startuml
note over Alice : Alice的初始状态
note over Bob : Bob的初始状态
Bob -&gt; Alice : hello
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="174" height="196" class="scale" src="../imgw/img-0a9f7dee79bea48e0aeb0c62fe322368.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><ul><li>with <code class="cod">/</code><em>(the notes are aligned)</em></li></ul><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg6abbfd3e9429be4efff55487bf02268a" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img6abbfd3e9429be4efff55487bf02268a" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;6abbfd3e9429be4efff55487bf02268a&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;6abbfd3e9429be4efff55487bf02268a&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;6abbfd3e9429be4efff55487bf02268a&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre6abbfd3e9429be4efff55487bf02268a">@startuml
note over Alice : Alice的初始状态
/ note over Bob : Bob的初始状态
Bob -&gt; Alice : hello
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="245" height="159" class="scale" src="../imgw/img-6abbfd3e9429be4efff55487bf02268a.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[参见 <a href="https://forum.plantuml.net/354">QA-354</a>]</em><a style="position:relative;top:-38px;" name="28881bae78acd047"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#19"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#19"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#19"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>Creole和HTML</h2><p></p><a href="creole.html">可以使用creole格式。</a><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgbc61232485cbe8402747bf4096a5c4e6" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgbc61232485cbe8402747bf4096a5c4e6" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;bc61232485cbe8402747bf4096a5c4e6&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;bc61232485cbe8402747bf4096a5c4e6&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;bc61232485cbe8402747bf4096a5c4e6&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prebc61232485cbe8402747bf4096a5c4e6">@startuml
participant Alice
participant &#34;The **Famous** Bob&#34; as Bob

Alice -&gt; Bob : hello --there--
... Some ~~long delay~~ ...
Bob -&gt; Alice : ok
note left
  This is **bold**
  This is //italics//
  This is &#34;&#34;monospaced&#34;&#34;
  This is --stroked--
  This is __underlined__
  This is ~~waved~~
end note

Alice -&gt; Bob : A //well formatted// message
note right of Alice
 This is &lt;back:cadetblue&gt;&lt;size:18&gt;displayed&lt;/size&gt;&lt;/back&gt;
 __left of__ Alice.
end note
note left of Bob
 &lt;u:red&gt;This&lt;/u&gt; is &lt;color #118888&gt;displayed&lt;/color&gt;
 **&lt;color purple&gt;left of&lt;/color&gt; &lt;s:red&gt;Alice&lt;/strike&gt; Bob**.
end note
note over Alice, Bob
 &lt;w:#FF33FF&gt;This is hosted&lt;/w&gt; by &lt;img sourceforge.jpg&gt;
end note
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="395" height="477" class="scale" src="../imgw/img-bc61232485cbe8402747bf4096a5c4e6.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="d4b2df53a72661cc"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-122"></span><!-- ezoic_pub_ad_placeholder-122-incontent_9-234x60-122-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-122-incontent_9-468x60-122-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-122-incontent_9-728x90-122-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-122-incontent_9-970x90-122-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#20"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#20"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#20"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>分隔符</h2><p></p><p></p> 你可以通过使用<code class="cod">==</code>关键词来将你的图表分割成多个逻辑步骤。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msga2d71b75e4ab767ca33cf0135c5b2f04" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imga2d71b75e4ab767ca33cf0135c5b2f04" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;a2d71b75e4ab767ca33cf0135c5b2f04&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;a2d71b75e4ab767ca33cf0135c5b2f04&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;a2d71b75e4ab767ca33cf0135c5b2f04&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prea2d71b75e4ab767ca33cf0135c5b2f04">@startuml

== 初始化 ==

Alice -&gt; Bob: 认证请求
Bob --&gt; Alice: 认证响应

== 重复 ==

Alice -&gt; Bob: 认证请求
Alice &lt;-- Bob: 认证响应

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="133" height="303" class="scale" src="../imgw/img-a2d71b75e4ab767ca33cf0135c5b2f04.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="63d5049791d9d79d"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#21"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#21"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#21"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>引用</h2><p></p> 你可以在图中通过使用<code class="cod">ref over</code>关键词来实现引用 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg5ba1ce6eb2a2750fb701f299b65a9ae4" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img5ba1ce6eb2a2750fb701f299b65a9ae4" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;5ba1ce6eb2a2750fb701f299b65a9ae4&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;5ba1ce6eb2a2750fb701f299b65a9ae4&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;5ba1ce6eb2a2750fb701f299b65a9ae4&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre5ba1ce6eb2a2750fb701f299b65a9ae4">@startuml
participant Alice
actor Bob

ref over Alice, Bob : init

Alice -&gt; Bob : hello

ref over Bob
  This can be on
  several lines
end ref
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="153" height="322" class="scale" src="../imgw/img-5ba1ce6eb2a2750fb701f299b65a9ae4.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="8f497c1a3d15af9e"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-123"></span><!-- ezoic_pub_ad_placeholder-123-incontent_10-234x60-123-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-123-incontent_10-468x60-123-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-123-incontent_10-728x90-123-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-123-incontent_10-970x90-123-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#22"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#22"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#22"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>延迟</h2><p></p> 你可以使用<code class="cod">...</code>来表示延迟，并且还可以给延迟添加注释。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgd991aaaea48c09a412e504282ab6e260" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgd991aaaea48c09a412e504282ab6e260" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;d991aaaea48c09a412e504282ab6e260&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;d991aaaea48c09a412e504282ab6e260&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;d991aaaea48c09a412e504282ab6e260&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pred991aaaea48c09a412e504282ab6e260">@startuml

Alice -&gt; Bob: 认证请求
...
Bob --&gt; Alice: 认证响应
...5分钟后...
Bob --&gt; Alice: 再见！

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="127" height="254" class="scale" src="../imgw/img-d991aaaea48c09a412e504282ab6e260.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="8659eac9bf4c2629"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#23"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#23"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#23"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>文本换行</h2><p></p> 你可以通过手动在文本中添加<code class="cod">\n</code>使长文本换行。 <p></p> 或者使用<code class="cod">maxMessageSize</code>设置（此方式暂不支持中文换行）： <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgc335a45bd5009b55b96ee10092205ac4" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgc335a45bd5009b55b96ee10092205ac4" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;c335a45bd5009b55b96ee10092205ac4&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;c335a45bd5009b55b96ee10092205ac4&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;c335a45bd5009b55b96ee10092205ac4&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prec335a45bd5009b55b96ee10092205ac4">@startuml
skinparam maxMessageSize 50
participant a
participant b
a -&gt; b :这\n一条\n是\n手动换行
a -&gt; b :this is a very long message on several words
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="109" height="301" class="scale" src="../imgw/img-c335a45bd5009b55b96ee10092205ac4.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="d511f8439ecde366"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-194"></span><!-- ezoic_pub_ad_placeholder-194-incontent_11-234x60-194-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-194-incontent_11-468x60-194-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-194-incontent_11-728x90-194-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-194-incontent_11-970x90-194-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#24"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#24"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#24"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>空间</h2><p></p><p></p> 你可以使用<code class="cod">|||</code>来增加空间。 <p></p> 还可以使用数字指定增加的像素的数量。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg5e0e219d546c55766abe7ac956746220" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img5e0e219d546c55766abe7ac956746220" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;5e0e219d546c55766abe7ac956746220&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;5e0e219d546c55766abe7ac956746220&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;5e0e219d546c55766abe7ac956746220&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre5e0e219d546c55766abe7ac956746220">@startuml

Alice -&gt; Bob: message 1
Bob --&gt; Alice: ok
|||
Alice -&gt; Bob: message 2
Bob --&gt; Alice: ok
||45||
Alice -&gt; Bob: message 3
Bob --&gt; Alice: ok

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="139" height="345" class="scale" src="../imgw/img-5e0e219d546c55766abe7ac956746220.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="5cc0040514e70f7b"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#25"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#25"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#25"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>生命线的激活与撤销</h2><p></p> 关键字<code class="cod">activate</code>和<code class="cod">deactivate</code>用来表示参与者的生命活动。 <p></p> 一旦参与者被激活，它的生命线就会显示出来。 <p></p><code class="cod">activate</code>和<code class="cod">deactivate</code>适用于以上情形。 <p></p><code class="cod">destroy</code>表示一个参与者的生命线的终结。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg346b84c1053fe2a2ef91024a1bfa9457" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img346b84c1053fe2a2ef91024a1bfa9457" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;346b84c1053fe2a2ef91024a1bfa9457&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;346b84c1053fe2a2ef91024a1bfa9457&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;346b84c1053fe2a2ef91024a1bfa9457&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre346b84c1053fe2a2ef91024a1bfa9457">@startuml
participant User

User -&gt; A: DoWork
activate A

A -&gt; B: &lt;&lt; createRequest &gt;&gt;
activate B

B -&gt; C: DoWork
activate C
C --&gt; B: WorkDone
destroy C

B --&gt; A: RequestCreated
deactivate B

A -&gt; User: Done
deactivate A

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="336" height="275" class="scale" src="../imgw/img-346b84c1053fe2a2ef91024a1bfa9457.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p> 还可以使用嵌套的生命线，并且运行给生命线添加<a href="color.html">颜色</a>。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg553ae8c7d0c430fe07c8bcaacf370721" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img553ae8c7d0c430fe07c8bcaacf370721" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;553ae8c7d0c430fe07c8bcaacf370721&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;553ae8c7d0c430fe07c8bcaacf370721&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;553ae8c7d0c430fe07c8bcaacf370721&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre553ae8c7d0c430fe07c8bcaacf370721">@startuml
participant User

User -&gt; A: DoWork
activate A #FFBBBB

A -&gt; A: Internal call
activate A #DarkSalmon

A -&gt; B: &lt;&lt; createRequest &gt;&gt;
activate B

B --&gt; A: RequestCreated
deactivate B
deactivate A
A -&gt; User: Done
deactivate A

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="246" height="257" class="scale" src="../imgw/img-553ae8c7d0c430fe07c8bcaacf370721.png"/></div></div></td></tr></tbody></table></p><p></p><p></p> 也可以使用自动激活关键字（autoactivate），这需要与<code class="cod">return</code>关键字配合： <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg5ec945ec2f6fb1c265f56b8b908e14a0" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img5ec945ec2f6fb1c265f56b8b908e14a0" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;5ec945ec2f6fb1c265f56b8b908e14a0&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;5ec945ec2f6fb1c265f56b8b908e14a0&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;5ec945ec2f6fb1c265f56b8b908e14a0&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre5ec945ec2f6fb1c265f56b8b908e14a0">@startuml
autoactivate on
alice -&gt; bob : hello
bob -&gt; bob : self call
bill -&gt; bob #005500 : hello from thread 2
bob -&gt; george ** : create
return done in thread 2
return rc
bob -&gt; george !! : delete
return success

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="335" height="374" class="scale" src="../imgw/img-5ec945ec2f6fb1c265f56b8b908e14a0.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="988fd738de9c6d17"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-195"></span><!-- ezoic_pub_ad_placeholder-195-incontent_12-234x60-195-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-195-incontent_12-468x60-195-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-195-incontent_12-728x90-195-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-195-incontent_12-970x90-195-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#26"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#26"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#26"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>返回</h2><p></p> 新命令<code class="cod">return</code>可以用于生成一个带有可选文本标签的返回信息。返回的点是导致最近一次激活生命线的点。语法是简单的返回标签，其中标签（如果提供）可以是传统信息中可以接受的任何字符串。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg1839d4f98ff5465dd1ca6dceec89155c" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img1839d4f98ff5465dd1ca6dceec89155c" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;1839d4f98ff5465dd1ca6dceec89155c&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;1839d4f98ff5465dd1ca6dceec89155c&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;1839d4f98ff5465dd1ca6dceec89155c&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre1839d4f98ff5465dd1ca6dceec89155c">@startuml
Bob -&gt; Alice : hello
activate Alice
Alice -&gt; Alice : some action
return bye
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="165" height="197" class="scale" src="../imgw/img-1839d4f98ff5465dd1ca6dceec89155c.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="b2c1d43bde93c643"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#27"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#27"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#27"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>创建参与者</h2><p></p><p></p> 你可以把关键字<code class="cod">create</code>放在第一次接收到消息之前，以强调本次消息实际上是在<em>创建</em>新的对象。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgfbddd5d67ec721a2643941ac3b8084c6" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgfbddd5d67ec721a2643941ac3b8084c6" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;fbddd5d67ec721a2643941ac3b8084c6&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;fbddd5d67ec721a2643941ac3b8084c6&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;fbddd5d67ec721a2643941ac3b8084c6&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prefbddd5d67ec721a2643941ac3b8084c6">@startuml
Bob -&gt; Alice : hello

create Other
Alice -&gt; Other : new

create control String
Alice -&gt; String
note right : You can also put notes!

Alice --&gt; Bob : ok

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="394" height="287" class="scale" src="../imgw/img-fbddd5d67ec721a2643941ac3b8084c6.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p><p></p><a style="position:relative;top:-38px;" name="35480215b426d170"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-196"></span><!-- ezoic_pub_ad_placeholder-196-incontent_13-234x60-196-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-196-incontent_13-468x60-196-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-196-incontent_13-728x90-196-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-196-incontent_13-970x90-196-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#28"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#28"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#28"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>激活、撤销和创建的快捷语法。</h2><p></p><p></p> 在指定目标参与者后，可以立即使用以下语法： <p></p><ul><li><code class="cod">++</code> 激活目标（可选择在后面加上<a href="color.html">#color</a>）</li><li><code class="cod">--</code> 撤销激活源</li><li><code class="cod">**</code> 创建目标实例</li><li><code class="cod">!!</code> 摧毁目标实例</li></ul><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgc6e213004028abc795a872e1af31c3a2" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgc6e213004028abc795a872e1af31c3a2" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;c6e213004028abc795a872e1af31c3a2&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;c6e213004028abc795a872e1af31c3a2&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;c6e213004028abc795a872e1af31c3a2&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prec6e213004028abc795a872e1af31c3a2">@startuml
alice -&gt; bob ++ : hello
bob -&gt; bob ++ : self call
bob -&gt; bib ++  #005500 : hello
bob -&gt; george ** : create
return done
return rc
bob -&gt; george !! : delete
return success
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="263" height="374" class="scale" src="../imgw/img-c6e213004028abc795a872e1af31c3a2.png"/></div></div></td></tr></tbody></table></p><p></p><p></p> 然后你就可以在一行上同时激活和撤销： <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg7e7eb19a99e1b0849a7f08382027cd30" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img7e7eb19a99e1b0849a7f08382027cd30" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;7e7eb19a99e1b0849a7f08382027cd30&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;7e7eb19a99e1b0849a7f08382027cd30&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;7e7eb19a99e1b0849a7f08382027cd30&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre7e7eb19a99e1b0849a7f08382027cd30">@startuml
alice   -&gt;  bob     ++   : hello1
bob     -&gt;  charlie --++ : hello2
charlie --&gt; alice   --   : ok
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="180" height="184" class="scale" src="../imgw/img-7e7eb19a99e1b0849a7f08382027cd30.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg4df43fc85fa68c4b27847457fc0a0571" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img4df43fc85fa68c4b27847457fc0a0571" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;4df43fc85fa68c4b27847457fc0a0571&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;4df43fc85fa68c4b27847457fc0a0571&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;4df43fc85fa68c4b27847457fc0a0571&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre4df43fc85fa68c4b27847457fc0a0571">@startuml
@startuml
alice -&gt; bob   --++ #gold: hello
bob   -&gt; alice --++ #gold: you too
alice -&gt; bob   --: step1
alice -&gt; bob   : step2
@enduml
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="122" height="214" class="scale" src="../imgw/img-4df43fc85fa68c4b27847457fc0a0571.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[参见 <a href="https://forum.plantuml.net/4834/activation-shorthand-for-sequence-diagrams?show=13054#c13054">QA-4834</a>, <a href="https://forum.plantuml.net/9573">QA-9573</a> 和 <a href="https://forum.plantuml.net/13234">QA-13234</a>]</em><a style="position:relative;top:-38px;" name="05984b1743e67542"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#29"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#29"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#29"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>进入和发出消息</h2><p></p> 如果只想关注部分图示，你可以使用进入和发出箭头。 <p></p> 使用方括号<code class="cod">[</code>和<code class="cod">]</code>表示图示的左、右两侧。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg9e2ee3a7565b5ef4bae24ce3277d16b4" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img9e2ee3a7565b5ef4bae24ce3277d16b4" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;9e2ee3a7565b5ef4bae24ce3277d16b4&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;9e2ee3a7565b5ef4bae24ce3277d16b4&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;9e2ee3a7565b5ef4bae24ce3277d16b4&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre9e2ee3a7565b5ef4bae24ce3277d16b4">@startuml
[-&gt; A: DoWork

activate A

A -&gt; A: Internal call
activate A

A -&gt;] : &lt;&lt; createRequest &gt;&gt;

A&lt;--] : RequestCreated
deactivate A
[&lt;- A: Done
deactivate A
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="208" height="257" class="scale" src="../imgw/img-9e2ee3a7565b5ef4bae24ce3277d16b4.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p> 还可以使用下面的语法: <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgcba9b6024cbd369e112fbefe3d3b42de" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgcba9b6024cbd369e112fbefe3d3b42de" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;cba9b6024cbd369e112fbefe3d3b42de&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;cba9b6024cbd369e112fbefe3d3b42de&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;cba9b6024cbd369e112fbefe3d3b42de&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="precba9b6024cbd369e112fbefe3d3b42de">@startuml
participant Alice
participant Bob #lightblue
Alice -&gt; Bob
Bob -&gt; Carol
...
[-&gt; Bob
[o-&gt; Bob
[o-&gt;o Bob
[x-&gt; Bob
...
[&lt;- Bob
[x&lt;- Bob
...
Bob -&gt;]
Bob -&gt;o]
Bob o-&gt;o]
Bob -&gt;x]
...
Bob &lt;-]
Bob x&lt;-]

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="166" height="401" class="scale" src="../imgw/img-cba9b6024cbd369e112fbefe3d3b42de.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="098797a007f231ea"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-197"></span><!-- ezoic_pub_ad_placeholder-197-incontent_14-234x60-197-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-197-incontent_14-468x60-197-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-197-incontent_14-728x90-197-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-197-incontent_14-970x90-197-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#30"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#30"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#30"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>缩短的进入信息与发出信息箭头</h2><p></p> 使用<code class="cod">?</code>来显示<strong>缩短</strong>的箭头。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msga821ea882e831ab1e84f7e5f596b270e" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imga821ea882e831ab1e84f7e5f596b270e" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;a821ea882e831ab1e84f7e5f596b270e&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;a821ea882e831ab1e84f7e5f596b270e&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;a821ea882e831ab1e84f7e5f596b270e&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prea821ea882e831ab1e84f7e5f596b270e">@startuml
?-&gt; Alice    : &#34;&#34;?-&gt;&#34;&#34;\n**short** to actor1
[-&gt; Alice    : &#34;&#34;[-&gt;&#34;&#34;\n**from start** to actor1
[-&gt; Bob      : &#34;&#34;[-&gt;&#34;&#34;\n**from start** to actor2
?-&gt; Bob      : &#34;&#34;?-&gt;&#34;&#34;\n**short** to actor2
Alice -&gt;]    : &#34;&#34;-&gt;]&#34;&#34;\nfrom actor1 **to end**
Alice -&gt;?    : &#34;&#34;-&gt;?&#34;&#34;\n**short** from actor1
Alice -&gt; Bob : &#34;&#34;-&gt;&#34;&#34; \nfrom actor1 to actor2
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="307" height="424" class="scale" src="../imgw/img-a821ea882e831ab1e84f7e5f596b270e.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[参见 <a href="https://forum.plantuml.net/310">QA-310</a>]</em><a style="position:relative;top:-38px;" name="77c3940b98127fb8"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#31"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#31"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#31"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>锚点和持续时间</h2><p></p><p></p><p></p> 使用<code class="cod">teoz</code>在图表中添加锚点，从而指定持续时间。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg78a0feb58314eea77258850fcff57023" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img78a0feb58314eea77258850fcff57023" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;78a0feb58314eea77258850fcff57023&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;78a0feb58314eea77258850fcff57023&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;78a0feb58314eea77258850fcff57023&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre78a0feb58314eea77258850fcff57023">@startuml
!pragma teoz true

{start} Alice -&gt; Bob : start doing things during duration
Bob -&gt; Max : something
Max -&gt; Bob : something else
{end} Bob -&gt; Alice : finish

{start} &lt;-&gt; {end} : some time

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="376" height="213" class="scale" src="../imgw/img-78a0feb58314eea77258850fcff57023.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p> You can use the <code class="cod">-P</code><a href="command-line.html">command-line</a> option to specify the pragma: <p><code></code></p><pre class="colo"><code>java -jar plantuml.jar -Pteoz=true
</code></pre><p><em>[Ref. <a href="https://github.com/plantuml/plantuml/issues/582">issue-582</a>]</em></p><center><div class="tago">WARNING</div> <b>This translation need to be updated.</b> <div class="tago">WARNING</div></center><a style="position:relative;top:-38px;" name="94190c2f242a5df2"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-198"></span><!-- ezoic_pub_ad_placeholder-198-incontent_15-234x60-198-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-198-incontent_15-468x60-198-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-198-incontent_15-728x90-198-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-198-incontent_15-970x90-198-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#32"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#32"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#32"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>构造类型和圈点</h2><p></p><p></p><p></p> 可以使用<code class="cod">&lt;&lt;</code>和<code class="cod">&gt;&gt;</code>给参与者添加构造类型。 <p></p> 在构造类型中，你可以使用<code class="cod">(X,color)</code>格式的语法添加一个圆圈圈起来的字符。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg4194bdef21ee9d4e2d2e2fe5d801eea7" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img4194bdef21ee9d4e2d2e2fe5d801eea7" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;4194bdef21ee9d4e2d2e2fe5d801eea7&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;4194bdef21ee9d4e2d2e2fe5d801eea7&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;4194bdef21ee9d4e2d2e2fe5d801eea7&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre4194bdef21ee9d4e2d2e2fe5d801eea7">@startuml

participant &#34;Famous Bob&#34; as Bob &lt;&lt; Generated &gt;&gt;
participant Alice &lt;&lt; (C,#ADD1B2) Testable &gt;&gt;

Bob-&gt;Alice: First message

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="231" height="158" class="scale" src="../imgw/img-4194bdef21ee9d4e2d2e2fe5d801eea7.png"/></div></div></td></tr></tbody></table></p><p></p><p></p> 默认使用 <em>guillemet</em> 字符来显示构造类型。 你可以使用外观参数 <code class="cod">guillemet</code> 来修改显示行为。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg457282e60f64490ead93b29ab5cf13ef" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img457282e60f64490ead93b29ab5cf13ef" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;457282e60f64490ead93b29ab5cf13ef&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;457282e60f64490ead93b29ab5cf13ef&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;457282e60f64490ead93b29ab5cf13ef&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre457282e60f64490ead93b29ab5cf13ef">@startuml

skinparam guillemet false
participant &#34;Famous Bob&#34; as Bob &lt;&lt; Generated &gt;&gt;
participant Alice &lt;&lt; (C,#ADD1B2) Testable &gt;&gt;

Bob-&gt;Alice: First message

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="279" height="158" class="scale" src="../imgw/img-457282e60f64490ead93b29ab5cf13ef.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg2b4924bebbf48d984a93aa7e7ff8c093" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img2b4924bebbf48d984a93aa7e7ff8c093" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;2b4924bebbf48d984a93aa7e7ff8c093&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;2b4924bebbf48d984a93aa7e7ff8c093&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;2b4924bebbf48d984a93aa7e7ff8c093&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre2b4924bebbf48d984a93aa7e7ff8c093">@startuml

participant Bob &lt;&lt; (C,#ADD1B2) &gt;&gt;
participant Alice &lt;&lt; (C,#ADD1B2) &gt;&gt;

Bob-&gt;Alice: First message

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="186" height="132" class="scale" src="../imgw/img-2b4924bebbf48d984a93aa7e7ff8c093.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="a21f56b1869e89e5"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#33"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#33"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#33"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>更多标题信息</h2><p></p> 你可以在标题中使用<a href="creole.html">creole</a>格式。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg7fe5544a5d717a993d15163e8b44864f" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img7fe5544a5d717a993d15163e8b44864f" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;7fe5544a5d717a993d15163e8b44864f&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;7fe5544a5d717a993d15163e8b44864f&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;7fe5544a5d717a993d15163e8b44864f&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre7fe5544a5d717a993d15163e8b44864f">@startuml

title __Simple__ **communication** example

Alice -&gt; Bob: Authentication Request
Bob -&gt; Alice: Authentication Response

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="247" height="192" class="scale" src="../imgw/img-7fe5544a5d717a993d15163e8b44864f.png"/></div></div></td></tr></tbody></table></p><p> 在标题描述中使用<code class="cod">\n</code>表示换行。 </p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg387838f59de001327f3eb969a9e66810" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img387838f59de001327f3eb969a9e66810" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;387838f59de001327f3eb969a9e66810&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;387838f59de001327f3eb969a9e66810&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;387838f59de001327f3eb969a9e66810&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre387838f59de001327f3eb969a9e66810">@startuml

title __Simple__ communication example\non several lines

Alice -&gt; Bob: Authentication Request
Bob -&gt; Alice: Authentication Response

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="247" height="210" class="scale" src="../imgw/img-387838f59de001327f3eb969a9e66810.png"/></div></div></td></tr></tbody></table></p><p> 还可以使用关键字<code class="cod">title</code>和<code class="cod">end title</code>定义多行标题。 </p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg88adbdddc6821cfe202efeb97a528d87" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img88adbdddc6821cfe202efeb97a528d87" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;88adbdddc6821cfe202efeb97a528d87&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;88adbdddc6821cfe202efeb97a528d87&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;88adbdddc6821cfe202efeb97a528d87&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre88adbdddc6821cfe202efeb97a528d87">@startuml

title
 &lt;u&gt;Simple&lt;/u&gt; communication example
 on &lt;i&gt;several&lt;/i&gt; lines and using &lt;font color=red&gt;html&lt;/font&gt;
 This is hosted by &lt;img:sourceforge.jpg&gt;
end title

Alice -&gt; Bob: Authentication Request
Bob -&gt; Alice: Authentication Response

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="255" height="241" class="scale" src="../imgw/img-88adbdddc6821cfe202efeb97a528d87.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="f52672a8f74a07df"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-199"></span><!-- ezoic_pub_ad_placeholder-199-incontent_16-234x60-199-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-199-incontent_16-468x60-199-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-199-incontent_16-728x90-199-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-199-incontent_16-970x90-199-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#34"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#34"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#34"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>包裹参与者</h2><p></p><p></p><p></p> 可以使用<code class="cod">box</code>和<code class="cod">end box</code>画一个盒子将参与者包裹起来。 <p></p> 还可以在<code class="cod">box</code>关键字之后添加标题或者背景颜色。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg505226a6f7b26fc2c89bdf8ee1270456" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img505226a6f7b26fc2c89bdf8ee1270456" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;505226a6f7b26fc2c89bdf8ee1270456&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;505226a6f7b26fc2c89bdf8ee1270456&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;505226a6f7b26fc2c89bdf8ee1270456&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre505226a6f7b26fc2c89bdf8ee1270456">@startuml

box &#34;Internal Service&#34; #LightBlue
participant Bob
participant Alice
end box
participant Other

Bob -&gt; Alice : hello
Alice -&gt; Other : hello

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="169" height="180" class="scale" src="../imgw/img-505226a6f7b26fc2c89bdf8ee1270456.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p><center><div class="tago">WARNING</div> <b>This translation need to be updated.</b> <div class="tago">WARNING</div></center><a style="position:relative;top:-38px;" name="21380379ba44081d"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#35"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#35"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#35"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>移除脚注</h2><p></p> 使用<code class="cod">hide footbox</code>关键字移除脚注。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg29bded41658bd84d3d6a5747cf5e7198" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img29bded41658bd84d3d6a5747cf5e7198" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;29bded41658bd84d3d6a5747cf5e7198&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;29bded41658bd84d3d6a5747cf5e7198&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;29bded41658bd84d3d6a5747cf5e7198&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre29bded41658bd84d3d6a5747cf5e7198">@startuml

hide footbox
title Footer removed

Alice -&gt; Bob: Authentication Request
Bob --&gt; Alice: Authentication Response

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="220" height="162" class="scale" src="../imgw/img-29bded41658bd84d3d6a5747cf5e7198.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="7aa53dbdfc2137bf"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-600"></span><!-- ezoic_pub_ad_placeholder-600-incontent_17-234x60-600-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-600-incontent_17-468x60-600-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-600-incontent_17-728x90-600-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-600-incontent_17-970x90-600-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#36"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#36"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#36"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>外观参数(skinparam)</h2><p></p><p></p> 用<a href="skinparam.html">skinparam</a>改变字体和颜色。 <p></p> 可以在如下场景中使用： <ul><li>在图示的定义中，</li><li><a href="preprocessing.html">在引入的文件中</a>，</li><li>在<a href="command-line.html">命令行</a>或者<a href="ant-task.html">ANT任务</a>提供的配置文件中。</li></ul><p></p> 你也可以修改其他渲染元素，如以下示例： <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg07249dcf267159cee1e88b5416ad712b" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img07249dcf267159cee1e88b5416ad712b" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;07249dcf267159cee1e88b5416ad712b&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;07249dcf267159cee1e88b5416ad712b&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;07249dcf267159cee1e88b5416ad712b&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre07249dcf267159cee1e88b5416ad712b">@startuml
skinparam sequenceArrowThickness 2
skinparam roundcorner 20
skinparam maxmessagesize 60
skinparam sequenceParticipant underline

actor User
participant &#34;First Class&#34; as A
participant &#34;Second Class&#34; as B
participant &#34;Last Class&#34; as C

User -&gt; A: DoWork
activate A

A -&gt; B: Create Request
activate B

B -&gt; C: DoWork
activate C
C --&gt; B: WorkDone
destroy C

B --&gt; A: Request Created
deactivate B

A --&gt; User: Done
deactivate A

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="340" height="398" class="scale" src="../imgw/img-07249dcf267159cee1e88b5416ad712b.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgc14cd9e6876e934e2d848d8e30e17451" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgc14cd9e6876e934e2d848d8e30e17451" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;c14cd9e6876e934e2d848d8e30e17451&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;c14cd9e6876e934e2d848d8e30e17451&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;c14cd9e6876e934e2d848d8e30e17451&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prec14cd9e6876e934e2d848d8e30e17451">@startuml
skinparam backgroundColor #EEEBDC
skinparam handwritten true

skinparam sequence {
ArrowColor DeepSkyBlue
ActorBorderColor DeepSkyBlue
LifeLineBorderColor blue
LifeLineBackgroundColor #A9DCDF

ParticipantBorderColor DeepSkyBlue
ParticipantBackgroundColor DodgerBlue
ParticipantFontName Impact
ParticipantFontSize 17
ParticipantFontColor #A9DCDF

ActorBackgroundColor aqua
ActorFontColor DeepSkyBlue
ActorFontSize 17
ActorFontName Aapex
}

actor User
participant &#34;First Class&#34; as A
participant &#34;Second Class&#34; as B
participant &#34;Last Class&#34; as C

User -&gt; A: DoWork
activate A

A -&gt; B: Create Request
activate B

B -&gt; C: DoWork
activate C
C --&gt; B: WorkDone
destroy C

B --&gt; A: Request Created
deactivate B

A --&gt; User: Done
deactivate A

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="383" height="373" class="scale" src="../imgw/img-c14cd9e6876e934e2d848d8e30e17451.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p><a style="position:relative;top:-38px;" name="33cee7c2521befd3"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#37"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#37"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#37"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>填充区设置</h2><p></p><p></p> 可以设定填充区的参数配置。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg145c4346e55e3ff7c46c41642a78429b" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img145c4346e55e3ff7c46c41642a78429b" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;145c4346e55e3ff7c46c41642a78429b&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;145c4346e55e3ff7c46c41642a78429b&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;145c4346e55e3ff7c46c41642a78429b&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre145c4346e55e3ff7c46c41642a78429b">@startuml
skinparam ParticipantPadding 20
skinparam BoxPadding 10

box &#34;Foo1&#34;
participant Alice1
participant Alice2
end box
box &#34;Foo2&#34;
participant Bob1
participant Bob2
end box
Alice1 -&gt; Bob1 : hello
Alice1 -&gt; Out : out
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="505" height="180" class="scale" src="../imgw/img-145c4346e55e3ff7c46c41642a78429b.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p><a style="position:relative;top:-38px;" name="4764f83f72ed032f"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-601"></span><!-- ezoic_pub_ad_placeholder-601-incontent_18-234x60-601-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-601-incontent_18-468x60-601-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-601-incontent_18-728x90-601-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-601-incontent_18-970x90-601-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#38"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#38"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#38"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>附录：箭头类型大全</h2><p></p><h3>普通箭头</h3><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg46b7a95dbf5b9ce3495eb36843654b16" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img46b7a95dbf5b9ce3495eb36843654b16" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;46b7a95dbf5b9ce3495eb36843654b16&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;46b7a95dbf5b9ce3495eb36843654b16&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;46b7a95dbf5b9ce3495eb36843654b16&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre46b7a95dbf5b9ce3495eb36843654b16">@startuml
participant Alice as a
participant Bob   as b
a -&gt;     b : &#34;&#34;-&gt;   &#34;&#34;
a -&gt;&gt;    b : &#34;&#34;-&gt;&gt;  &#34;&#34;
a -\     b : &#34;&#34;-\   &#34;&#34;
a -\\    b : &#34;&#34;-\\\\&#34;&#34;
a -/     b : &#34;&#34;-/   &#34;&#34;
a -//    b : &#34;&#34;-//  &#34;&#34;
a -&gt;x    b : &#34;&#34;-&gt;x  &#34;&#34;
a x-&gt;    b : &#34;&#34;x-&gt;  &#34;&#34;
a o-&gt;    b : &#34;&#34;o-&gt;  &#34;&#34;
a -&gt;o    b : &#34;&#34;-&gt;o  &#34;&#34;
a o-&gt;o   b : &#34;&#34;o-&gt;o &#34;&#34;
a &lt;-&gt;    b : &#34;&#34;&lt;-&gt;  &#34;&#34;
a o&lt;-&gt;o  b : &#34;&#34;o&lt;-&gt;o&#34;&#34;
a x&lt;-&gt;x  b : &#34;&#34;x&lt;-&gt;x&#34;&#34;
a -&gt;&gt;o   b : &#34;&#34;-&gt;&gt;o &#34;&#34;
a -\o    b : &#34;&#34;-\o  &#34;&#34;
a -\\o   b : &#34;&#34;-\\\\o&#34;&#34;
a -/o    b : &#34;&#34;-/o  &#34;&#34;
a -//o   b : &#34;&#34;-//o &#34;&#34;
a x-&gt;o   b : &#34;&#34;x-&gt;o &#34;&#34;
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="115" height="712" class="scale" src="../imgw/img-46b7a95dbf5b9ce3495eb36843654b16.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><h3>进入信息和发出信息（使用&#39;[&#39;, &#39;]&#39;）</h3><h4>进入信息（使用&#39;[&#39;）</h4><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg044ce3e913112f50b4617d82db0d3afe" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img044ce3e913112f50b4617d82db0d3afe" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;044ce3e913112f50b4617d82db0d3afe&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;044ce3e913112f50b4617d82db0d3afe&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;044ce3e913112f50b4617d82db0d3afe&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre044ce3e913112f50b4617d82db0d3afe">@startuml
participant Alice as a
participant Bob   as b
[-&gt;      b : &#34;&#34;[-&gt;   &#34;&#34;
[-&gt;&gt;     b : &#34;&#34;[-&gt;&gt;  &#34;&#34;
[-\      b : &#34;&#34;[-\   &#34;&#34;
[-\\     b : &#34;&#34;[-\\\\&#34;&#34;
[-/      b : &#34;&#34;[-/   &#34;&#34;
[-//     b : &#34;&#34;[-//  &#34;&#34;
[-&gt;x     b : &#34;&#34;[-&gt;x  &#34;&#34;
[x-&gt;     b : &#34;&#34;[x-&gt;  &#34;&#34;
[o-&gt;     b : &#34;&#34;[o-&gt;  &#34;&#34;
[-&gt;o     b : &#34;&#34;[-&gt;o  &#34;&#34;
[o-&gt;o    b : &#34;&#34;[o-&gt;o &#34;&#34;
[&lt;-&gt;     b : &#34;&#34;[&lt;-&gt;  &#34;&#34;
[o&lt;-&gt;o   b : &#34;&#34;[o&lt;-&gt;o&#34;&#34;
[x&lt;-&gt;x   b : &#34;&#34;[x&lt;-&gt;x&#34;&#34;
[-&gt;&gt;o    b : &#34;&#34;[-&gt;&gt;o &#34;&#34;
[-\o     b : &#34;&#34;[-\o  &#34;&#34;
[-\\o    b : &#34;&#34;[-\\\\o&#34;&#34;
[-/o     b : &#34;&#34;[-/o  &#34;&#34;
[-//o    b : &#34;&#34;[-//o &#34;&#34;
[x-&gt;o    b : &#34;&#34;[x-&gt;o &#34;&#34;
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="104" height="712" class="scale" src="../imgw/img-044ce3e913112f50b4617d82db0d3afe.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><h4>发出信息（使用&#39;]&#39;）</h4><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg070cf52f667739d1c55924626efcd285" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img070cf52f667739d1c55924626efcd285" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;070cf52f667739d1c55924626efcd285&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;070cf52f667739d1c55924626efcd285&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;070cf52f667739d1c55924626efcd285&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre070cf52f667739d1c55924626efcd285">@startuml
participant Alice as a
participant Bob   as b
a -&gt;]      : &#34;&#34;-&gt;]   &#34;&#34;
a -&gt;&gt;]     : &#34;&#34;-&gt;&gt;]  &#34;&#34;
a -\]      : &#34;&#34;-\]   &#34;&#34;
a -\\]     : &#34;&#34;-\\\\]&#34;&#34;
a -/]      : &#34;&#34;-/]   &#34;&#34;
a -//]     : &#34;&#34;-//]  &#34;&#34;
a -&gt;x]     : &#34;&#34;-&gt;x]  &#34;&#34;
a x-&gt;]     : &#34;&#34;x-&gt;]  &#34;&#34;
a o-&gt;]     : &#34;&#34;o-&gt;]  &#34;&#34;
a -&gt;o]     : &#34;&#34;-&gt;o]  &#34;&#34;
a o-&gt;o]    : &#34;&#34;o-&gt;o] &#34;&#34;
a &lt;-&gt;]     : &#34;&#34;&lt;-&gt;]  &#34;&#34;
a o&lt;-&gt;o]   : &#34;&#34;o&lt;-&gt;o]&#34;&#34;
a x&lt;-&gt;x]   : &#34;&#34;x&lt;-&gt;x]&#34;&#34;
a -&gt;&gt;o]    : &#34;&#34;-&gt;&gt;o] &#34;&#34;
a -\o]     : &#34;&#34;-\o]  &#34;&#34;
a -\\o]    : &#34;&#34;-\\\\o]&#34;&#34;
a -/o]     : &#34;&#34;-/o]  &#34;&#34;
a -//o]    : &#34;&#34;-//o] &#34;&#34;
a x-&gt;o]    : &#34;&#34;x-&gt;o] &#34;&#34;
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="112" height="712" class="scale" src="../imgw/img-070cf52f667739d1c55924626efcd285.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><h3>短进入信息和短发出信息（使用&#39;?&#39;）</h3><h4>短进入信息（使用&#39;?&#39;）</h4><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg875bf2f4268a3d3c6ea05b739035c4dc" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img875bf2f4268a3d3c6ea05b739035c4dc" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;875bf2f4268a3d3c6ea05b739035c4dc&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;875bf2f4268a3d3c6ea05b739035c4dc&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;875bf2f4268a3d3c6ea05b739035c4dc&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre875bf2f4268a3d3c6ea05b739035c4dc">@startuml
participant Alice as a
participant Bob   as b
a -&gt;     b : //Long long label//
?-&gt;      b : &#34;&#34;?-&gt;   &#34;&#34;
?-&gt;&gt;     b : &#34;&#34;?-&gt;&gt;  &#34;&#34;
?-\      b : &#34;&#34;?-\   &#34;&#34;
?-\\     b : &#34;&#34;?-\\\\&#34;&#34;
?-/      b : &#34;&#34;?-/   &#34;&#34;
?-//     b : &#34;&#34;?-//  &#34;&#34;
?-&gt;x     b : &#34;&#34;?-&gt;x  &#34;&#34;
?x-&gt;     b : &#34;&#34;?x-&gt;  &#34;&#34;
?o-&gt;     b : &#34;&#34;?o-&gt;  &#34;&#34;
?-&gt;o     b : &#34;&#34;?-&gt;o  &#34;&#34;
?o-&gt;o    b : &#34;&#34;?o-&gt;o &#34;&#34;
?&lt;-&gt;     b : &#34;&#34;?&lt;-&gt;  &#34;&#34;
?o&lt;-&gt;o   b : &#34;&#34;?o&lt;-&gt;o&#34;&#34;
?x&lt;-&gt;x   b : &#34;&#34;?x&lt;-&gt;x&#34;&#34;
?-&gt;&gt;o    b : &#34;&#34;?-&gt;&gt;o &#34;&#34;
?-\o     b : &#34;&#34;?-\o  &#34;&#34;
?-\\o    b : &#34;&#34;?-\\\\o &#34;&#34;
?-/o     b : &#34;&#34;?-/o  &#34;&#34;
?-//o    b : &#34;&#34;?-//o &#34;&#34;
?x-&gt;o    b : &#34;&#34;?x-&gt;o &#34;&#34;
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="163" height="743" class="scale" src="../imgw/img-875bf2f4268a3d3c6ea05b739035c4dc.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><h4>短发出信息（使用&#39;?&#39;）</h4><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgfab765f0a216ee44bb77a694cd781b60" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgfab765f0a216ee44bb77a694cd781b60" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;fab765f0a216ee44bb77a694cd781b60&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;fab765f0a216ee44bb77a694cd781b60&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;fab765f0a216ee44bb77a694cd781b60&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prefab765f0a216ee44bb77a694cd781b60">@startuml
participant Alice as a
participant Bob   as b
a -&gt;     b : //Long long label//
a -&gt;?      : &#34;&#34;-&gt;?   &#34;&#34;
a -&gt;&gt;?     : &#34;&#34;-&gt;&gt;?  &#34;&#34;
a -\?      : &#34;&#34;-\?   &#34;&#34;
a -\\?     : &#34;&#34;-\\\\?&#34;&#34;
a -/?      : &#34;&#34;-/?   &#34;&#34;
a -//?     : &#34;&#34;-//?  &#34;&#34;
a -&gt;x?     : &#34;&#34;-&gt;x?  &#34;&#34;
a x-&gt;?     : &#34;&#34;x-&gt;?  &#34;&#34;
a o-&gt;?     : &#34;&#34;o-&gt;?  &#34;&#34;
a -&gt;o?     : &#34;&#34;-&gt;o?  &#34;&#34;
a o-&gt;o?    : &#34;&#34;o-&gt;o? &#34;&#34;
a &lt;-&gt;?     : &#34;&#34;&lt;-&gt;?  &#34;&#34;
a o&lt;-&gt;o?   : &#34;&#34;o&lt;-&gt;o?&#34;&#34;
a x&lt;-&gt;x?   : &#34;&#34;x&lt;-&gt;x?&#34;&#34;
a -&gt;&gt;o?    : &#34;&#34;-&gt;&gt;o? &#34;&#34;
a -\o?     : &#34;&#34;-\o?  &#34;&#34;
a -\\o?    : &#34;&#34;-\\\\o?&#34;&#34;
a -/o?     : &#34;&#34;-/o?  &#34;&#34;
a -//o?    : &#34;&#34;-//o? &#34;&#34;
a x-&gt;o?    : &#34;&#34;x-&gt;o? &#34;&#34;
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="163" height="743" class="scale" src="../imgw/img-fab765f0a216ee44bb77a694cd781b60.png"/></div></div></td></tr></tbody></table></p><p></p><center><div class="tago">WARNING</div> <b>This translation need to be updated.</b> <div class="tago">WARNING</div></center><a style="position:relative;top:-38px;" name="75b4984abd04b14f"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#39"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#39"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#39"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>特定外观参数</h2><p></p><h3>默认情况下</h3><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg558e7f1d1726f9ec2d6e554814722cce" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img558e7f1d1726f9ec2d6e554814722cce" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;558e7f1d1726f9ec2d6e554814722cce&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;558e7f1d1726f9ec2d6e554814722cce&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;558e7f1d1726f9ec2d6e554814722cce&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre558e7f1d1726f9ec2d6e554814722cce">@startuml
Bob -&gt; Alice : hello
Alice -&gt; Bob : ok
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="103" height="153" class="scale" src="../imgw/img-558e7f1d1726f9ec2d6e554814722cce.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><h3>生命线策略 </h3><p></p><ul><li>nosolid 虚线 <em>（默认情况）</em></li></ul><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg4d97119e4e78b6b6aa456d2eaf08f550" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img4d97119e4e78b6b6aa456d2eaf08f550" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;4d97119e4e78b6b6aa456d2eaf08f550&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;4d97119e4e78b6b6aa456d2eaf08f550&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;4d97119e4e78b6b6aa456d2eaf08f550&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre4d97119e4e78b6b6aa456d2eaf08f550">@startuml
skinparam lifelineStrategy nosolid
Bob -&gt; Alice : hello
Alice -&gt; Bob : ok
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="103" height="153" class="scale" src="../imgw/img-4d97119e4e78b6b6aa456d2eaf08f550.png"/></div></div></td></tr></tbody></table></p><p><em>[参见 <a href="https://forum.plantuml.net/9016/">QA-9016</a>]</em></p><p></p><ul><li>solid 实线</li></ul> 在时序图中使用实线生命线：<code class="cod">skinparam lifelineStrategy solid</code><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg8f3d13ad427db826515907c82cc6a8c3" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img8f3d13ad427db826515907c82cc6a8c3" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;8f3d13ad427db826515907c82cc6a8c3&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;8f3d13ad427db826515907c82cc6a8c3&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;8f3d13ad427db826515907c82cc6a8c3&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre8f3d13ad427db826515907c82cc6a8c3">@startuml
skinparam lifelineStrategy solid
Bob -&gt; Alice : hello
Alice -&gt; Bob : ok
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="103" height="153" class="scale" src="../imgw/img-8f3d13ad427db826515907c82cc6a8c3.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[参见 <a href="https://forum.plantuml.net/2794">QA-2794</a>]</em><p></p><h3>style strictuml</h3><p></p> 为了符合严格UML的标准（<em>线头的形状必须是三角形，而不能是箭头形</em>），你可以使用： <ul><li><code class="cod">skinparam style strictuml</code></li></ul><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg7f51258b2e964b6115e5e134e5fbe9ee" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img7f51258b2e964b6115e5e134e5fbe9ee" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;7f51258b2e964b6115e5e134e5fbe9ee&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;7f51258b2e964b6115e5e134e5fbe9ee&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;7f51258b2e964b6115e5e134e5fbe9ee&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre7f51258b2e964b6115e5e134e5fbe9ee">@startuml
skinparam style strictuml
Bob -&gt; Alice : hello
Alice -&gt; Bob : ok
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="103" height="124" class="scale" src="../imgw/img-7f51258b2e964b6115e5e134e5fbe9ee.png"/></div></div></td></tr></tbody></table></p><p><em>[参见 <a href="https://forum.plantuml.net/1047">QA-1047</a>]</em><a style="position:relative;top:-38px;" name="fc006eba0d9dcacc"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-602"></span><!-- ezoic_pub_ad_placeholder-602-incontent_19-234x60-602-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-602-incontent_19-468x60-602-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-602-incontent_19-728x90-602-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-602-incontent_19-970x90-602-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#40"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#40"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#40"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>隐藏孤立参与者</h2><p></p> 默认情况下会显示所有参与者。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msga2eb206c294c79f541f7d09abb432ad4" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imga2eb206c294c79f541f7d09abb432ad4" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;a2eb206c294c79f541f7d09abb432ad4&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;a2eb206c294c79f541f7d09abb432ad4&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;a2eb206c294c79f541f7d09abb432ad4&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prea2eb206c294c79f541f7d09abb432ad4">@startuml
participant Alice
participant Bob
participant Carol

Alice -&gt; Bob : hello
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="161" height="123" class="scale" src="../imgw/img-a2eb206c294c79f541f7d09abb432ad4.png"/></div></div></td></tr></tbody></table></p><p></p><p></p> 可以使用<code class="cod">hide unlinked</code>命令来隐藏未被链接到的参与者。 <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg056e92e670bf7b6909793b5fe754d0f1" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img056e92e670bf7b6909793b5fe754d0f1" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;056e92e670bf7b6909793b5fe754d0f1&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;056e92e670bf7b6909793b5fe754d0f1&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;056e92e670bf7b6909793b5fe754d0f1&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre056e92e670bf7b6909793b5fe754d0f1">@startuml
hide unlinked
participant Alice
participant Bob
participant Carol

Alice -&gt; Bob : hello
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="103" height="123" class="scale" src="../imgw/img-056e92e670bf7b6909793b5fe754d0f1.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/4247">QA-4247</a>]</em><a style="position:relative;top:-38px;" name="b40d18fd973705df"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#41"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#41"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#41"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>给分组信息着色</h2><p></p><p></p> 可以给分组信息color[着色]。 <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgf450bfa73c3f2e7ec824fe690687438e" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgf450bfa73c3f2e7ec824fe690687438e" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;f450bfa73c3f2e7ec824fe690687438e&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;f450bfa73c3f2e7ec824fe690687438e&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;f450bfa73c3f2e7ec824fe690687438e&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pref450bfa73c3f2e7ec824fe690687438e">@startuml
Alice -&gt; Bob: Authentication Request
alt#Gold #LightBlue Successful case
    Bob -&gt; Alice: Authentication Accepted
else #Pink Failure
    Bob -&gt; Alice: Authentication Rejected
end
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="243" height="232" class="scale" src="../imgw/img-f450bfa73c3f2e7ec824fe690687438e.png"/></div></div></td></tr></tbody></table></p><p><em>[Ref.<a href="https://forum.plantuml.net/4750">QA-4750</a>and<a href="https://forum.plantuml.net/6410">QA-6410</a>]</em><a style="position:relative;top:-38px;" name="5640ee4b2a998e5e"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-603"></span><!-- ezoic_pub_ad_placeholder-603-incontent_20-234x60-603-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-603-incontent_20-468x60-603-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-603-incontent_20-728x90-603-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-603-incontent_20-970x90-603-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#42"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#42"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#42"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>Mainframe</h2><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgc4ec03a18fcfc68bcd353059debc12e2" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgc4ec03a18fcfc68bcd353059debc12e2" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;c4ec03a18fcfc68bcd353059debc12e2&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;c4ec03a18fcfc68bcd353059debc12e2&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;c4ec03a18fcfc68bcd353059debc12e2&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prec4ec03a18fcfc68bcd353059debc12e2">@startuml
mainframe This is a **mainframe**
Alice-&gt;Bob : Hello
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="160" height="180" class="scale" src="../imgw/img-c4ec03a18fcfc68bcd353059debc12e2.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/4019">QA-4019</a> and <a href="https://github.com/plantuml/plantuml/issues/148">Issue#148</a>]</em><a style="position:relative;top:-38px;" name="5bd6712206960fab"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="../backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="../edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/cmp/dokuwiki/zh/sequence-diagram#43"><img width="20" height="20" src="../dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/cmp/asciidoc/zh/sequence-diagram#43"><img width="20" height="20" src="../asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/cmp/markdown/zh/sequence-diagram#43"><img width="20" height="20" src="../markdown.png"/>Edit in Markdown</a></div></div>Slanted or odd arrows </h2><p></p> You can use the <code class="cod">(nn)</code> option (before or after arrow) to make the arrows slanted, where <em>nn</em> is the number of shift pixels. <p></p><em>[Available only after v1.2022.6beta+]</em><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgf583240f6ec9f89c9f0e47122f00d62d" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgf583240f6ec9f89c9f0e47122f00d62d" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;f583240f6ec9f89c9f0e47122f00d62d&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;f583240f6ec9f89c9f0e47122f00d62d&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;f583240f6ec9f89c9f0e47122f00d62d&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pref583240f6ec9f89c9f0e47122f00d62d">@startuml
A -&gt;(10) B: text 10
B -&gt;(10) A: text 10

A -&gt;(10) B: text 10
A (10)&lt;- B: text 10
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="97" height="274" class="scale" src="../imgw/img-f583240f6ec9f89c9f0e47122f00d62d.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgb638ae197e85fcff76220547ef652bb7" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgb638ae197e85fcff76220547ef652bb7" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;b638ae197e85fcff76220547ef652bb7&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;b638ae197e85fcff76220547ef652bb7&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;b638ae197e85fcff76220547ef652bb7&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="preb638ae197e85fcff76220547ef652bb7">@startuml
A -&gt;(40) B++: Rq
B --&gt;(20) A--: Rs
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="78" height="233" class="scale" src="../imgw/img-b638ae197e85fcff76220547ef652bb7.png"/></div></div></td></tr></tbody></table></p><p><em>[Ref. <a href="https://forum.plantuml.net/14145/plantuml-draw-odd-line">QA-14145</a>]</em></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg903dcf267e8a7ad06297afab499456f1" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img903dcf267e8a7ad06297afab499456f1" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;903dcf267e8a7ad06297afab499456f1&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;903dcf267e8a7ad06297afab499456f1&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;903dcf267e8a7ad06297afab499456f1&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre903dcf267e8a7ad06297afab499456f1">@startuml
!pragma teoz true
A -&gt;(50) C: Starts\nwhen &#39;B&#39; sends
&amp; B -&gt;(25) C: \nBut B&#39;s message\n arrives before A&#39;s
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="269" height="205" class="scale" src="../imgw/img-903dcf267e8a7ad06297afab499456f1.png"/></div></div></td></tr></tbody></table></p><p><em>[Ref. <a href="https://forum.plantuml.net/6684/non-instantaneous-messages-in-sequence-diagram">QA-6684</a>]</em></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg8a08becacb01a1131be39d41141cc3e3" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img8a08becacb01a1131be39d41141cc3e3" title="Copy to clipboard" class="cop" src="../clipboard1.svg" onclick="ctc(&#39;8a08becacb01a1131be39d41141cc3e3&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="../edit1.svg" onclick="javascript:ljs(&#39;8a08becacb01a1131be39d41141cc3e3&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;8a08becacb01a1131be39d41141cc3e3&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre8a08becacb01a1131be39d41141cc3e3">@startuml
!pragma teoz true

S1 -&gt;(30) S2: msg 1\n
&amp; S2 -&gt;(30) S1: msg 2

note left S1: msg\nS2 to S1
&amp; note right S2: msg\nS1 to S2
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="230" height="251" class="scale" src="../imgw/img-8a08becacb01a1131be39d41141cc3e3.png"/></div></div></td></tr></tbody></table></p><p><em>[Ref. <a href="https://forum.plantuml.net/1072/sequence-diagram-crossed-arrows">QA-1072</a>]</em></p></td><td id="toctd" valign="top" style="max-width:240px;min-width:240px;"><div id="toc"><ul><li><a href="sequence-diagram.html#7aea6e3ecced51f5">基本的例子</a></li><li><a href="sequence-diagram.html#5d2ed256d73a7298">声明参与者</a></li><li><a href="sequence-diagram.html#6c2a1c77df70f96d">多行定义参与者</a></li><li><a href="sequence-diagram.html#2210ebadb5117709">在参与者中使用非字母</a></li><li><a href="sequence-diagram.html#f5050860884ddf31">给自己发消息</a></li><li><a href="sequence-diagram.html#bf6bee6d96403148">文本对齐</a></li><li><a href="sequence-diagram.html#efeda651e89e596c">改变箭头样式</a></li><li><a href="sequence-diagram.html#0b2e57c3d4eafdda">修改箭头颜色</a></li><li><a href="sequence-diagram.html#ce3f7eb577ad5f4d">对消息序列编号</a></li><li><a href="sequence-diagram.html#77852febc7dde952">页面标题、页眉和页脚</a></li><li><a href="sequence-diagram.html#45d7d5b32d17a0f9">分割示意图</a></li><li><a href="sequence-diagram.html#425ba4350c02142c">组合消息</a></li><li><a href="sequence-diagram.html#7aad256d9e87308c">次级分组标签</a></li><li><a href="sequence-diagram.html#012d3e8694a98cc1">注释信息</a></li><li><a href="sequence-diagram.html#f8c59a77112b60e7">其他的注释信息方式</a></li><li><a href="sequence-diagram.html#84de38ea1ca38165">改变备注框的形状 [hnote和rnote]</a></li><li><a href="sequence-diagram.html#39755e6414c00844">在多个参与者添加备注 [across]</a></li><li><a href="sequence-diagram.html#7514641e1b91c8ee">在同一级对齐多个备注 [/]</a></li><li><a href="sequence-diagram.html#28881bae78acd047">Creole和HTML</a></li><li><a href="sequence-diagram.html#d4b2df53a72661cc">分隔符</a></li><li><a href="sequence-diagram.html#63d5049791d9d79d">引用</a></li><li><a href="sequence-diagram.html#8f497c1a3d15af9e">延迟</a></li><li><a href="sequence-diagram.html#8659eac9bf4c2629">文本换行</a></li><li><a href="sequence-diagram.html#d511f8439ecde366">空间</a></li><li><a href="sequence-diagram.html#5cc0040514e70f7b">生命线的激活与撤销</a></li><li><a href="sequence-diagram.html#988fd738de9c6d17">返回</a></li><li><a href="sequence-diagram.html#b2c1d43bde93c643">创建参与者</a></li><li><a href="sequence-diagram.html#35480215b426d170">激活、撤销和创建的快捷语法。</a></li><li><a href="sequence-diagram.html#05984b1743e67542">进入和发出消息</a></li><li><a href="sequence-diagram.html#098797a007f231ea">缩短的进入信息与发出信息箭头</a></li><li><a href="sequence-diagram.html#77c3940b98127fb8">锚点和持续时间</a></li><li><a href="sequence-diagram.html#94190c2f242a5df2">构造类型和圈点</a></li><li><a href="sequence-diagram.html#a21f56b1869e89e5">更多标题信息</a></li><li><a href="sequence-diagram.html#f52672a8f74a07df">包裹参与者</a></li><li><a href="sequence-diagram.html#21380379ba44081d">移除脚注</a></li><li><a href="sequence-diagram.html#7aa53dbdfc2137bf">外观参数(skinparam)</a></li><li><a href="sequence-diagram.html#33cee7c2521befd3">填充区设置</a></li><li><a href="sequence-diagram.html#4764f83f72ed032f">附录：箭头类型大全</a></li><li><a href="sequence-diagram.html#75b4984abd04b14f">特定外观参数</a></li><li><a href="sequence-diagram.html#fc006eba0d9dcacc">隐藏孤立参与者</a></li><li><a href="sequence-diagram.html#b40d18fd973705df">给分组信息着色</a></li><li><a href="sequence-diagram.html#5640ee4b2a998e5e">Mainframe</a></li><li><a href="sequence-diagram.html#5bd6712206960fab">Slanted or odd arrows</a></li></ul></div></td></tr></tbody></table></p><p></p><span id="ezoic-pub-ad-placeholder-104"></span><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-234x60-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-468x60-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-728x90-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-970x250-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-300x250x3-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-970x90-104-nonexxxnonexxxxxxezmaxscaleval100 --></div><style>.btm{text-align:center}.btm a{text-decoration:none;color:#637282}.btm a:hover{color:#0366d6}</style><div class="btm"><hr/><a href="https://g.ezoic.net/privacy/plantuml.com"><small>Privacy Policy</small></a>      <a href="../direct-sales.html"><small>Advertise</small></a><p></p></div><script>var sc_project=11129481;var sc_invisible=1;var sc_security="bd89fcfd";</script><script async="" src="https://www.statcounter.com/counter/counter.js"></script><!--[selectrongo:done]--><script type="text/javascript">
				var __inScopeForCCPA = false;
		function __uspapi(command, version, callback) {
			var response = null;
			var successs = false;
			if (command === "getUSPData" && version === 1) {
				var uspString = "1"; // Version
				if (__inScopeForCCPA) {
					uspString += "N"; // Has Explicit Notice for Opt Out been provided (ex footer or minor consent modal)
					var result;
					var consentCookie = (result = new RegExp('(?:^|; )ezoccpaconsent=([^;]*)').exec(document.cookie)) ? (result[1]) : null;
					if (consentCookie === "nonconsent") {
						uspString += "Y";
					}
					else {
						uspString += "N";
					}
					uspString += "N" // Is pub a signatory to the IAB Limited Service Provider Agreement (http://www.iabprivacy.com/)
				}
				else {
					uspString += "---";
				}
				response = {
					uspString: uspString,
					version: 1
				};
				success = true;
			}
			return callback(response, success);
		};
		function __receiveUspapiMessage(event) {
			if (event.data.hasOwnProperty('__uspapiCall')) {
				__uspapi('getUSPData', 1, function(uspData, success) {
					event.source.postMessage({
						__uspapiReturn: {
							returnValue: uspData,
							success: success,
							callId: event.data.__uspapiCall.callId
						}
					},
					event.origin);
				});
			}
			return null;
		};
		window.addEventListener("message", __receiveUspapiMessage, false);
</script>
<script>__ez.queue.addFile('/tardisrocinante/vitals.js', '/tardisrocinante/vitals.js?gcb=2&cb=3', false, ['/parsonsmaize/mulvane.js'], true, false, true, false);</script>
<script>var _audins_dom="plantuml_com",_audins_did=173770;__ez.queue.addDelayFunc("audins.js","__ez.script.add", "//go.ezodn.com/detroitchicago/audins.js?cb=195-2");</script><noscript><div style="display:none;"><img src="https://pixel.quantserve.com/pixel/p-31iz6hfFutd16.gif?labels=Domain.plantuml_com,DomainId.173770" border="0" height="1" width="1" alt="Quantcast"/></div></noscript>
<script>__ez.queue.addFile('/beardeddragon/drake.js', '/beardeddragon/drake.js?gcb=2&cb=4', false, [], true, false, true, false);</script>
<script type="text/javascript" style='display:none;'>var __ez_dims = (function() {
		var setCookie = function( name, content, expiry ) {
			return document.cookie = name+'='+content+((expiry)?';expires='+(new Date(Math.floor(new Date().getTime()+expiry*1000)).toUTCString()):'')+';path=/';
		};
		var ffid = 1;
		var oh = window.screen.height;
		var ow = window.screen.width;
		var h = ffid === 1 ? oh : (oh > ow) ? oh : ow;
		var w = ffid === 1 ? ow : (oh > ow) ? ow : oh;
		var uh = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;
		var uw = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
		setCookie('ezds', encodeURIComponent('ffid='+ffid+',w='+w+',h='+h), (31536e3*7));
		setCookie('ezohw', encodeURIComponent('w='+uw+',h='+uh), (31536e3*7));
	})();</script>
<script type='text/javascript' style='display:none;' async>__ez.queue.addFile('/parsonsmaize/chanute.js', '/parsonsmaize/chanute.js?a=a&cb=7&dcb=195-2&shcb=34', true, ['/parsonsmaize/mulvane.js'], true, false, false, false);</script>
<script type='text/javascript' style='display:none;' async>__ez.queue.addFile('/porpoiseant/jellyfish.js', '/porpoiseant/jellyfish.js?a=a&cb=10&dcb=195-2&shcb=34', false, [], true, false, false, false);</script></body></html>